Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is ORM (Linq, Hibernate...) really that useful?

I have been playing with some LINQ ORM (LINQ directly to SQL) and I have to admit I like its expressive powers . For small utility-like apps, It also works quite fast: dropping a SQL server on some surface and you're set to linq away.

For larger apps however, the DAL never was that big of an issue to me to setup, nor maintain, and more often than not, once it was set, all the programming was not happening there anyway...

My, honest - I am an ORM newbie - question : what is the big advantage of ORM over writing a decent DAL by hand?

(seems like a double, couldn't find it though)

UPDATE : OK its a double :-) I found it myself eventually :

ORM vs Handcoded Data Access Layer

like image 454
Peter Avatar asked Jun 02 '09 08:06

Peter


People also ask

Is Hibernate ORM good?

JPA and Hibernate ORM are a great fit for standard CRUD operations. They make the implementation of these use cases very easy and efficient.

Is ORM really necessary?

So, do you need an ORM? If you have any more or less complex project and you work with a relational database, then yes, definitely. Big ORMs seem "bloated" not because they are bad tools, but rather because the underlying problem of object-relational mapping is hard.

When should you not use an ORM?

If you know your data access pattern is going to be complex or you plan to use a lot of database-specific features, you may not want to use an ORM.

What is the purpose of the ORM tool Hibernate?

Hibernate is an open source object relational mapping (ORM) tool that provides a framework to map object-oriented domain models to relational databases for web applications. Object relational mapping is based on the containerization of objects and the abstraction that provides that capacity.


1 Answers

  • Strong-typing
  • No need to write the DAL yourself => time savings
  • No need to write SQL code yourself => less error-prone
like image 151
Thomas Levesque Avatar answered Sep 19 '22 06:09

Thomas Levesque