Remix.run Logo
manuelabeledo 2 hours ago

Mostly agreed with the author about ORMs. The provided querying abstraction works against developers when queries reach a certain level of complexity, and at the end of the day, understanding these complexities is not optional.

But I would caution against adding too much business logic to the database, and tying message passing to your database doesn’t sound like the best of ideas.

luckylion 2 hours ago | parent [-]

But there's also value gained in it, isn't there? I very much like doctrine's query builders and being able to analyze and manipulate queries programmatically, e.g. dynamically add a filter to a query and a join if needed. That's pretty simple with a query builder once you've gotten comfortable with the concept and the ORM itself, but it's pretty hard to do with plain sql unless you write plenty of specific code to handle all the known things you might care about.

manuelabeledo 2 hours ago | parent [-]

It sounds to me that you saying that SQL is hard because you’d rather learn the intricacies of an ORM.

Also, this whole point predicates upon the assumption that ORMs are infallible when translating queries into SQL, which most definitely are not.