The advantage of sleep mode?

Can anyone give me the gist of the main benefits of using Hibernate?

+4
source share
7 answers

Hibernate makes it easy to create a supported level of data access.

Hibernate is built on top of JDBC, so obviously it cannot do anything that simple JDBC cannot do. Hibernate - a large code base; if you create your own level of data access using simple JDBC, you will have much more code to write in accordance with your functions. In simple reporting applications, it is relatively easy to code the functions you need for the data access layer; but as the application becomes more complex, the amount of code that needs to be written increases. Let me give you a few examples that are not trivial to implement manually, but out of the box with Hibernate:

  • Providing Global Streamlining Registration Lock
  • Determining which fields of an object have been changed and customized the request accordingly (maybe this is not always a good idea)
  • The flexibility to switch between different sampling strategies ("here I want the user and address to be loaded together, but here I just want only the user") in different cases

As I hinted, implementing them manually is not impossible - after that, Hibernate does this. But they make significant investments on time. In many (most?) Applications, focusing on the complexities of business logic would be the best investment of developers' time.

See my comment in another thread regarding Hibernate performance.

+7
source

I found this useful if you need your application to work with several different databases. Hibernate will make it easy to replace MySql databases with Oracle, for example.

+1
source

Simple development, but only for simple applications.

See the answers in How can I create a Java web application without ORM and without embedded SQL for more details.

0
source

No need to write your own DAL.

A steep learning curve may appear at first, but as soon as you get the gist of it, it will lead to faster development.

0
source

This is the ORM Framework (Object Relationship Mapping)!

0
source

ORMs (like Hibernate) allow you to use POJO / POCOs, which have a reliable and reliable database with minimal fuss. (Note: the amount of fuss is not guaranteed to be zero, but usually less than with other solutions. YMMV.)

0
source

Hibernation increases the productivity and maintainability of the project.
This can help
http://mudassirshahzad.com/why-hibernate-should-be-chosen-for-projects-advantages-of-hibernate/

0
source

All Articles