Re: What determines your use of the type of DB framework/abstract?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 22, 2011 at 11:31:54AM -0700, Jamie Krasnoo wrote:

> Sorry, not sure if the first part of the conversation made it to the list.
> 
> I will be looking in to Symfony. I'm well versed with ZF and Zend_Db.
> I'm also somewhat versed with Doctrine and integrating it with ZF. My
> question isn't whether Doctrine is a part *of* that framework but
> rather on *what* and *when* it is appropriate to *use* or *substitute*
> something like Doctrine instead of using straight pdo or mysqli or the
> abstract that came with that particular framework. Substituting
> Doctrine or some other abstract could complicate a project rather than
> help.

Doctrine is more than just an abstraction layer. Well, no, but it's also
an ORM framework. That alone would kill it for me.

I built my own wrapper around PDO, that I use whenever possible. Main
reason: it makes my interface the same, whether I'm using MySQL or
PostgreSQL. That simplifies things for me. Why not just use PDO? I think
PDO, for all its assets, has kind of a clunky interface. When I'm doing
work internally, I use PostgreSQL. But for customers, I'm generally
forced to use MySQL. So having the same interface for both (for the most
part) eases the work. As for ORMs, I'm old skool; my preference is to
use straight SQL where possible. I think it makes you think more
carefully about your database structure and the type of queries you do.
And sooner or later, ORM gets in the way of multi-table foreign-key
reliant queries.

Paul

-- 
Paul M. Foster
http://noferblatz.com
http://quillandmouse.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux