Are ORM's counterproductive to OO design?
Posted
by Jeremiah
on Stack Overflow
See other posts from Stack Overflow
or by Jeremiah
Published on 2010-04-12T20:14:27Z
Indexed on
2010/04/12
20:22 UTC
Read the original article
Hit count: 451
In OOD, design of an object is said to be characterized by its identity and behavior.
Having used OR/M's in the past, the primary purpose, in my opinion, revolves around the ability to store/retrieve data. That is to say, OR/M objects are not design by behavior, but rather data (i.e. database tables). Case and point: Many OR/M tools come with a point-to-a-database-table-and-click-object-generator.
If objects are no longer characterized by behavior this will, in my opinion, muddy the identity and responsibility of the objects. Subsequently, if objects are not defined by a responsibility this could lend a hand to having tightly coupled classes and overall poor design.
Furthermore, I would think that in an application setting, you would be heading towards scalability issues.
So, my question is, do you think that ORM's are counterproductive to OO design? Perhaps the underlying question would be whether or not they are counterproductive to application development.
© Stack Overflow or respective owner