top | item 9196919

(no title)

ismyrnow | 11 years ago

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.

discuss

order

No comments yet.