Re: New PDO-based DBAL/ORM for PEAR2

From: Date: Tue, 20 Nov 2007 17:43:08 +0000
Subject: Re: New PDO-based DBAL/ORM for PEAR2
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-48513@lists.php.net to get a copy of this message
On 20.11.2007, at 17:50, Bertrand Mansion wrote:
Le 20 nov. 07 à 16:49, Lukas Kahwe Smith a écrit :
Funny that I managed to port my CMS from MySQL to PostgreSQL in 2 hours (mostly fixing reliance on non deterministic group by's) and to SQLite in 3 hours (1 hour was used to add a feature to handle the fact the SQLite by default qualifies joined columns with the table name unless aliased) as it was based on MDB2. I should also mention that the installation tools based on MDB2_Schema needed no alterations. I also did not feel like I was artificially limiting myself. For example one thing that did require custom code was the internal search, which was based on MySQL's FULLTEXT indexes. But that was a minimal amount of work and a tiny addition to the code. Just to set the record straight.
Actually, 2-3 hours sounds quite long to me given the fact that you know those databases well and that you wrote MDB2 :) Furthermore, I don't think you accounted MySQL Fulltext replacement in your 2-3 hours neither. A real abstraction would allow a database change in 5 minutes, just the time it takes to change the DSN.
The point being that with the new option the work on SQLite would be reduced to setting that option and the PostgreSQL fixes were abuses of the SQL standard that are not fixed once and for all. And yes .. the 2-3 hours did not account for the full text part.
If you know beforehand that your application will have to work on different databases, you choose the SQL you use carefully, then the switch is even faster than 2-3 hours. There is no need to use a "slow as hell" layer to do this, especially when PDO does most of the ugly job.
That advice might work out if you only use varchar for storage. regards, Lukas

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