4 ms·
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'
by le-mark 9y ago
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_orms_have_taught_me_just_learn_sql/cjheyec/ https://www.reddit.com/r/programming/comments/2cnw8x/what_or...
- arwhatever 9y agoConvincing 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.
- WalterGR 9y agoCitations needed.
- arwhatever 9y agoHave 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% :-)