

Ask HN: Do you use ORMs for your back end databases? - jyotiska


======
ismyrnow
I've used Entity Framework in .NET extensively, and since moving to NodeJS
back ends, have used Bookshelf.JS a bit, and researched numerous others.

In my opinion, an ORM is only worth using if it is _very_ mature. I'm talking
third major version mature. My biggest pain point in using an ORM isn't a lack
of features, but the inability to easily drop-down a level, and skip the
abstraction in order to get something unique done.

Entity Framework has been around a long time, and is the standard in the .NET
world, probably in the same way ActiveRecord is for Rails. EF not only
provides well thought out and proven abstractions, but also makes it easy to
just write a complex SQL query when necessary. Bookshelf.JS lacks that
maturity. It was helpful at the prototyping stage, but has gotten in the way
as things became more complex.

Unless there is a clear best practice for your stack, I would stick with a
simple library to build parameterized SQL queries (we use Knex for NodeJS),
and build a data access layer. If you layer and abstract things well, you can
always start with an ORM and move away from it if/when it gets in the way.

All that said, if you're just doing CRUD, an ORM will save you time. Just know
that nearly every app idea is "just CRUD" in the beginning, but tends away
from that as time goes on.

------
atmosx
My projects are made with Sinatra and Sequel (a nice ORM similar to AR). That
said I don't have any particular SQL needs... Just input/delete/edit and
search records from the DB. The rest is done by the app.

------
infinitone
Any basic rails stack would probably be using ActiveRecord which is the
default ORM. I remember interviewing at a large medical health record company
and they had built their own ORM and regretted it and were (at the time)
trying to move off it.

------
manidoraisamy
Heavy user of Hibernate and SQLAlchemy during SQL days. Stopped using it,
after moving to NoSQL - because of broken portability.

------
some_furry
I mostly write raw SQL for everything, but I'm a bit privileged in that I have
years of DBA experience.

------
giaour
I use Doctrine with MongoDB at my day job ,and it is a fate I would not wish
on my worst enemies.

------
bbcbasic
Yes I use Entity Framework in .NET.

In most cases ORM makes sense. Saves a lot of boring work, reduces bugs etc.

------
mercnet
Yes I use mix of SQLAlchemy and raw SQL.

