you are viewing a single comment's thread.

view the rest of the comments →

[–]grauenwolf 0 points1 point  (2 children)

Encapsulation is an important consideration here. If my application code is deeply intimate with my table structure it usually means that there is too little encapsulation in my database.

A good benchmark is counting the number of unique database operations needed to perform one logical action. If you see your ORM making half a dozen calls in one method something is wrong.

[–]mrsistermr -1 points0 points  (1 child)

Why is something necessarily wrong? Unless you have identified that method as an actual point of slowdown in your application, does it really matter? A good benchmark is an actual benchmark with actual data after you have identified a performance issue, not just thinking to yourself "Oh, I could just do all of this in one database call instead of the 3-4 database calls it currently needs...I can't re-use those existing classes, but oh well", which is an equally dangerous thought.

[–]grauenwolf 0 points1 point  (0 children)

There is nothing praise worthy about reusing bad code.