Re: MDB2 API
| From: | Lukas Smith | Date: | Tue, 25 May 2004 15:50:31 +0000 |
| Subject: | Re: MDB2 API | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-29652@lists.php.net to get a copy of this message | ||
Paul M Jones wrote:
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).Well someone can write a wrapper around PDO to give it the DB API doesnt provide any value beyond legacy compatibility. It would speed it up alot (faster than MDB2 right now most likely) but it would be PHP5 only. It would still be missing a great number of features that MDB2 provides (debugging/logging, management methods, being able to change the dsn of an existing instance, datatype abstraction etc.) It would be a drop in replacement though. This does mean that we will still end up maintaing the old DB version, this new DB version as well as all the MDBx versions. From a maintaince perspective it makes no sense at all. On the other hand we can have a single abstraction layer which provides the necessary wrappers for previous abstraction layers. This will focus our development efforts. Those wrappers will suffer a bit of performance loss. However those will be fairly minimal compared to the cost of actually querying a database. Remember all this new stuff doesnt take DB away as it currently stands. If there is sufficient interest there will be wrappers to make the new stuff compatible with the old API. However it makes no sense to cling onto the DB API forever as our main abstraction layer if this means we cannot add missing features in a clean and efficient manner. We have regulations for BC breaks which make new major versions as painless as possible. At the same time I dont want to run into major version inflation either. By having a new MDB2 with a DB similar API and then immidiately starting an MDB3 with the PDO API. Thats why I still feel its better to have MDB2 become DBv2 using an extended PDO API. There will be a wrapper for DB with performance not that much slower than DB itself (depends on the RDBMS). This way we will have 1 abstraction layer and 2 legacy abstraction layers to maintain until PHP5 has become the defacto standard and we might want a PHP5 only PDO only abstraction layer to be our main abstraction layer. regards, Lukas Smith smith@backendmedia.com _______________________________ BackendMedia www.backendmedia.com berlin@backendmedia.com Linn Zwoch Smith GbR Pariser Str. 44 D-10707 Berlin Tel +49 30 83 22 50 00 Fax +49 30 83 22 50 07