3 ms·
>> In other words, ORMs are at their most useful when solving the least challenging problems. To which we must ask: why bother? 1. I disagree with your asserti
by nathan_long 14y ago
>> In other words, ORMs are at their most useful when solving the least challenging problems. To which we must ask: why bother?
1. I disagree with your assertion. Ruby's ActiveRecord has scopes that make it very easy to compose complex queries from pieces; start with a simple query, then conditionally add clauses like where, having, joins, group, order, etc. I'm looking at code right now where mixing and matching clauses like that was crucial. It would have been a nightmare to do in raw SQL.
2. Even if you were right, "least challenging" != "least annoying." Washing clothes is a trivial problem, but I'm glad to have a machine do it. Same for writing the same boilerplate SQL 30 times a day.