NYCPHP Meetup

NYPHP.org

[nycphp-talk] ORM anyone?

Ajai Khattri ajai at bitblit.net
Tue Sep 11 17:15:59 EDT 2007


On Tue, 11 Sep 2007, Kenneth Downs wrote:

> As you may guess, I'm no fan of ORM.  The main reason is what I just 
> said above.  OO code and table-based data are two very different beasts 
> with very different natures.  ORM tries to make one look like the 
> other.  Why would anybody want to do this?

For a couple of reasons:

1) Dealing with SQL from an OOP programming language is not natural.

2) Conceptual relationships are easier to deal with via objects.

3) It gives you a layer of abstraction above the database to the
   degree that it doesn't matter what the underlying database
   actually is, you have a uniform interface always. Doesn't matter
   if you switch SQLlite to MySQL to Postgres - all looks the same.


-- 
Aj.




More information about the talk mailing list