Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ORM Frameworks

 
Anil Vupputuri
Ranch Hand
Posts: 527
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Does your book mention any pitfalls or antipatterns related ORM frameworks such as Hibernate.

Thanks.
 
Bill Karwin
author
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Anil, your question is related to the question Wouter asked earlier.
http://www.coderanch.com/t/508679/JDBC/java/ORM-Antipatterns

I have a chapter describing how some ORM users confuse "model" with "table," and this confusion impacts their application design. Martin Fowler calls this the Anemic Domain Model: http://martinfowler.com/bliki/AnemicDomainModel.html

The confusion between model and table is pretty common in the Ruby, PHP, Python, and Perl developer communities, but I haven't found this to be as much of a problem in the Java community.

My advise is to decouple the model from the database access object. Treat them as two separate objects.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic