Re: ORM doctrine
| From: | Larry Garfield | Date: | Fri, 10 Dec 2010 01:35:28 +0000 |
| Subject: | Re: ORM doctrine | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-309939@lists.php.net to get a copy of this message | ||
On Thursday, December 09, 2010 12:45:38 pm David Harkness wrote:
> On Wed, Dec 8, 2010 at 11:11 PM, Daevid Vincent <daevid@daevid.com> wrote:
> > Avoid these ORM things like the plague! . . . Not to
> > mention all that fancy "ORM" doesn't come without a price. It costs in
> > terms
> > of speed, as well as training.
>
> If you value CPU time over developer time, by all means avoid ORM
> frameworks (and *all* frameworks). The point of a common framework is to
> trade a small bit of performance for a large amount of developer time. If
> you will only use the framework once, the payoff will be much less. The
> goal is to choose frameworks that you can leverage again and again.
>
> As for training, you will be able to hire another developer that knows
> Doctrine. It will be impossible to find a developer *anywhere* that
> understands your home-grown framework without training. Nor will you get
> help with bugs in your framework or be able to discuss better ways to use
> it on forums.
>
> That being said, there are times when it's better to write your own code. I
> will do this if the options out there don't suit my needs or if they seem
> under-supported. For example, while we use PHPUnit and Zend MVC in our
> apps, I wrote my own TestCase subclasses instead of using Zend's. I had to
> write documentation for the other developers, and I must maintain it as
> needs change. It was not a decision I took lightly.
>
> David
ORMs are fundamentally fighting the wrong battle. They have their use, but in
general they are architecturally not something you want to build your entire
system on.
See:
http://www.garfieldtech.com/blog/orm-vs-query-builders
http://blogs.tedneward.com/2006/06/26/The+Vietnam+Of+Computer+Science.aspx
--Larry Garfield