Comment

Comment by bunderbunder

I've come to a couple conclusions, over the years.

First, when you get down to it, the most-valued feature of ORMs is not the "writing queries in some language other than SQL" feature, it's the "not having to write a mess of mapping code" feature.

Second, the biggest drawbacks to ORMs all derive from the "writing queries in some language other than SQL" feature.

Fortunately, there are tools out there that solve the "mapping tables to objects" problem without trying to control all access to the database: So-called lightweight ORMs like Dapper and Sql2o. To me, these hit the sweet spot: They give you most the increase in productivity while steering clear of most the increase in complexity (and, by extension, decrease in maintainability).

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton