Re: New PDO-based DBAL/ORM for PEAR2

From: Date: Wed, 21 Nov 2007 01:51:19 +0000
Subject: Re: New PDO-based DBAL/ORM for PEAR2
References: 1 2 3 4 5 6  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-48533@lists.php.net to get a copy of this message
On Nov 20, 2007, at 6:13 PM, David Coallier wrote:
Michael, "PDO is the way PHP is getting?" I'd sure love to see that but I'm sorry that the numbers say something else: PDO statistics: 104 692 downloads http://pecl.php.net/package-stats.php?pid=335&rid=&cid=7 MDB2 statistics: 384 232 downloads http://pear.php.net/package-stats.php?pid=279&cid=7 And more ? Some software have MDB2 bundled.
What I meant to say was that everything I've read and heard so far indicates to me that PDO is the future of PHP database programming. Sure it doesn't have as many downloads now, but there are plenty of reasons for that: 1. It's newer 2. MDB2 is easier to use and has more features 3. There is more documentation for MDB2 4. PDO is distributed with PHP (I never downloaded it from PECL)
That's just about the same date range. Core devs would sure love to see PDO be used everywhere but that's only a wish. People try people try but the fact is that PDO is not the general direction.
I understand what you're saying but just think about it...in order to integrate support for the native PHP extensions and PDO...that's a LOT of work! You would basically have two separate modes of operation for database connections, and you would either writing twice the code or putting little if statements all over the place checking if you're supposed to be using PDO or the native extensions! ; )
All this to say one thing, you need to support more than only pdo in that package otherwise you'll only reach exactly that, 25-30% of the developers and companies out there.
MDB2 won't be going anywhere...right? If people are so hooked on using the native PHP extensions, even though they'll be slower, they can still use that if they want to...
P.S. Oh yeah PDO is written in C ? Man that must be why it's so fast..
Sorry...
- I'm not sure if the whole PDORM_Domain_inflector is such a great idea (for this package don't get me wrong). But to me it doesn't belong in that package at all. Another package ? Sure, but not in there. ref: (http://pdorm.googlecode.com/svn/trunk/PDORM/Domain/rules/en.php)
The only thing PDORM_Domain_Inflector does is converts singular words to plural. I guess I could create a separate package to do that and then use it as a dependency, but I don't think anybody would use it.
- Argh! Mapper.php, please handle what is wrong, don't just ignore it... @ is slow as hell anyways. ref: (http://pdorm.googlecode.com/svn/trunk/PDORM/Domain/Mapper.php)
Okay okay...changed. ; )
- I cannot seem to see LOB handling and Iteration through resultset ? Is that on purpose ?
PDO is supposed to be handling LOB...If not we can just port the MDB2 implementation.
- PDORM.php's factory() is imho WAY too dependant on PDO itself. I think this should go in a different "File" in a way that people can easily make their own drivers.
I'm not sure I understand here. Make their own drivers? What are you envisioning? Could you show me some pseudo code? Thanks for all the suggestions and critiques. I really do appreciate the time you've taken to look through it, and I'm taking notes of suggestions. Michael

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