What is Nostr?
Daniel Wigton
npub1w4j…30zp
2025-02-22 12:28:41
in reply to nevent1q…8lul

Daniel Wigton on Nostr: I am interested in hearing the argument. An ORM can certainly reduce boilerplate and ...

I am interested in hearing the argument. An ORM can certainly reduce boilerplate and protect against common security issues. Database migrations are useful as well.

I am, however, unconvinced that they are a net benefit. Some developers use them as a way to avoid having to write SQL, but SQL is dead simple and I have never met an ORM that was actually good at it. It generally means that the developer doesn't really understand what they are getting with their queries.

Also while an ORM might make 90% of your queries easier that last 10% might be downright impossible. Luckily you can just make stored procedures and more models in your code to match, but now a decent portion of your application logic is in your database and you have a mess in your code.
Author Public Key
npub1w4jkwspqn9svwnlrw0nfg0u2yx4cj6yfmp53ya4xp7r24k7gly4qaq30zp