News for hackers. Stuff that matters.
Re:Problems with Object/Relational Mapping (2006) by le-mark on Saturday July 22, 2017 @09:34PM (#14830458)
I agree that the Vietnam war exposition was very odd and out of place for a technical article. Gavin King (creator of hibernate/nhibernate) has always said ORM's are just a tool in a box and encouraged people to use what's appropriate[1]. I often see project teams adopting an ORM and attempting to shoehorn all database access into the ORM framework they've adopted. Needless to say, these teams grow to hate their ORM, with good reason.

The way this manifests in applications is often times a frontend client making several calls to the ORM backend for lists of objects, then mixing, matching, swizzling the data to what needs to be displayed to the user when a single call to a well crafted query would save bandwidth, improve application responsiveness, and be easier to debug and maintain.

It is relatively easy to draw a clear line between using ORMs for domain model persistence (complex, stateful CRUD) and SQL for relational model interaction (complex, stateless querying). It really comes down to: don't use ORMs for querying and don't use SQL for complex CRUD

[1] https://www.reddit.com/r/programming/comments/2cnw8x/what_or...

Re:Problems with Object/Relational Mapping (2006) by arwhatever on Sunday July 23, 2017 @05:20AM (#14831513)
Convincing a team to choose the best approach based on the situation is the hardest thing to do in the universe. It's got to be an all-or-nothing decision!

99.9% of the teams in the world are out there right now, either cranking out reams of unnecessarily boilerplate CRUD, or else torturing their application and database performance trying to get their ORM to accomplish things for which it is not at all suited.

Re:Problems with Object/Relational Mapping (2006) by WalterGR on Sunday July 23, 2017 @04:09PM (#14834130)
Citations needed.
Re:Problems with Object/Relational Mapping (2006) by arwhatever on Saturday July 29, 2017 @03:14PM (#14882599)
Have worked on 9 teams in the past 5 1/2 years or so, and 0 of them had the wherewithal to choose the optimal data access strategy on a situational basis. So, 100%, not 99.9% :-)