Re: MDB2 API

From: Date: Tue, 25 May 2004 15:34:44 +0000
Subject: Re: MDB2 API
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-29648@lists.php.net to get a copy of this message
Warning: Everything in my message is wild speculation. Take with as much salt as needed. This is still much time for many unexpected changes. :-) On May 25, 2004, at 9:22 AM, Lukas Smith wrote:
just letting you all know that there may still be changes in the MDB2 API. I wasnt expecting pdo (a php5 only unified API for RDBMS) to mature so quickly. I also didnt expect the API to diverge so much from previous PHP API's.
There was been some confusion about the exact relation between PDO and PEAR's database abstraction layers. In terms of abstraction PDO only provides a subset of what PEAR::DB is currently offering. If you ask the developers they will not call it a database abstraction layer but instead call it a wrapper around the native API's. It was also never the intent for PDO to become an abstraction layer. It was however always the intent that a PEAR package takes over this job (this is why the people who started PDO invited me to join them in the development process). Therefore MDB2 will not become obsolete with the release of PDO. 80% of DB will be obselete with PDO. That is as long as you use PHP 5(.1).
So 20% of it would not be obsolete? This sounds like it would be a bonus for DB: a future DB uses PDO internally, gets faster for it, and the DB users don't need to change their API calls. The remaining 20% (or whatever) of DB then becomes additional features, and it becomes easier for the DB devs (hi Daniel Convissor!) to extend and debug those features.
However PDO will become the defacto standard for RDBMS API's in PHP5 eventually. For this reason my plan is to make the MDB2 API an extension of the PDO API.
It might be the same for DB as well; of course, Daniel Convissor is The Man when it comes to DB, so I am eager to hear his opinions. He might not want DB to use PDO at all. Again, remember, this is just speculation. Let us assume that DB, in the future, uses PDO to speed itself up, and MDB also uses PDO. This means that the speed differences between DB and MDB would become much closer or even eliminated. Thus, the main reason to use MDB over DB would be the schema stuff. In theory, MDB could become an extension or wrapper of the hypothetical PDO-enhanced DB, much in the same way DB_Table is a wrapper (of course the MDB wrapper would have different pros and cons to it). Not trying to tell anybody what to do with their code, just thinking out loud. -- Paul M. Jones Savant: the simple alternative to Smarty for PHP. http://phpsavant.com/ DB_Table: build RDBMS tables and XHTML forms in one PHP class. http://wiki.ciaweb.net/yawiki/index.php?area=DB_Table Yawiki: your collaborative online documentation system. http://yawiki.com/ Yawp: a single-file foundation for PHP applications. http://phpyawp.com/

« previous php.pear.dev (#29648) next »