logoalt Hacker News

evantbyrneyesterday at 2:28 AM3 repliesview on HN

Nah. The most prolific backend frameworks are all built on ORMs for good reason. The best ones can deserialize inputs, validate them, place those object directly into the db, retrieve them later as objects, and then serialize them again all from essentially just a schema definition. Just to name a few advantages. Teams that take velocity seriously should use ORMs. As with any library choice you need to carefully vet them though.


Replies

marcus_holmesyesterday at 4:24 AM

The "good reason" is that modern web devs do not consider SQL a core skill, and plain do not understand databases. To be a competing modern web framework you have to include an ORM so these people will consider you.

Trying to explain to a modern web dev that the optimum data storage structure is not the same as the optimum application layer data structure, so you can't just take one and map them across 1:1 to the other, is really painful.

Developing without an ORM is just as quick as developing with one (because the time you save on routine queries you will more than lose on the tricky edge cases that the ORM completely screws up on). But you need to know SQL and databases to do it.

show 1 reply
wredcollyesterday at 4:04 AM

ORMs are pretty much the definition of technical debt.

Sometimes debt is worth it. Sometimes the interest rate is too high.

hombre_fatalyesterday at 11:35 AM

On the other hand, ORMs insulate you from database integrity since ORMs have limited access to underlying database features.

In Postgres that usually means you're not locking rows, you're not using upsert, you might not be writing table DDL yourself. It often means you aren't even using database transactions.

While these things might be extraneous fluff for an all-nighter hackathon, you really have to figure out a sweet spot so that data integrity violations aren't killing your velocity when your service's rubber begins hitting the road.

show 1 reply