News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Lee Davis' Blog:
In ORM's Defense
April 16, 2012 @ 11:58:29

Lee Davis has a recent post that tries to combat some of the most common excuses people give for not using an ORM rather than opting to write the queries themselves. He writes in defense of the ORM and gives reasons why some of these common complaints may not matter that much.

For some reason, as of late, I can't seem to attend any user group or conference without a speaker slating ORM's. Several speakers at the PHP UK Conference this year expressed their disapproval, as well as the speaker at this months PHP London talk. However, no one is giving me a strong enough argument to not use an ORM. Remarks such as "That's a whole other talk" or "Don't get me started on ORM's" seem to be thrown about. But whenever I get a chance to talk about any concerns or issues they're having the conversation just seems to deflate. Am I missing something really terrible about ORM's that's going to creep up and bite me?

He goes through and lists some of the most common and explains how, once you get past some of the initial impressions, they might not be so bad:

  • Using ORMs means having a one to one relation between object and table
  • ORMs produce sub-optimal SQL and far too many queries
  • Using ORMs means using active record
  • ORM is slower than just using SQL, Unlike other abstraction layers, which make up for their performance hit with faster development, ORM layers add almost nothing.
  • But just pulling out arrays are quicker
  • Incorrect abstraction - if you don't need relational data features you're using the wrong data store
0 comments voice your opinion now!
orm defend opinion excuses database


blog comments powered by Disqus

Similar Posts

Developer Drive: Introducing Laravel, part 2

JSLabs Blog: An ftp server written in PHP

Ross Tuck: Persisting Value Objects in Doctrine

MaltBlue.com: 3 Simple Ideas for Improving Zend Framework Performance

Codewalkers.com: New Things on the Tutorial Front (Pagination & Ajax)


Community Events





Don't see your event here?
Let us know!


language unittest configure series developer release community code interview refactor list testing framework experience introduction laravel threedevsandamaybe opinion install podcast

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework