[转]Hibernate advantages and disadvantages

From: http://www.roseindia.net/hibernate/examples/hibernate-advantages-and-disadvantages.html

Advantages of Hibernate

  • Hibernate is better then plain JDBC: You can use Hibernate which generates the SQL on the fly and then automatically executes the necessary SQL statements. This saves a lot of development and debugging time of the developer. Writing JDBC statement, setting the parameters, executing query and processing the result by hand is lot of work. Hibernate will save all tedious efforts.
     
  • Mapping of Domain object to relational database: Hibernate maps your domain object with the relational database. Now you can concentrate on your business logic rather than managing the data in database.
     
  • Layered architecture: Hibernate is layers architecture and you can use the components as per your application need.
     
  • JPA Provider: Hibernate can work as JPA provider in JPA based applications.
     
  • Standard ORM: Hibernate is standard ORM solutions and it also supports JPA.
     
  • Database Independent: Hibernate is database independent and you can use any database of your choice.
     
  •  Caching Framework: There are many caching framework that works with Hibernate. You can use any one in your application to improve the performance of your application.
     

Disadvantages of Hibernate

  • Lots of API to learn: A lot of effort is required to learn Hibernate. So, not very easy to learn hibernate easily.
     
  • Debugging: Sometimes debugging and performance tuning becomes difficult.
     
  • Slower than JDBC: Hibernate is slower than pure JDBC as it is generating lots of SQL statements in runtime.
     
  • Not suitable for Batch processing: It advisable to use pure JDBC for batch processing.

猜你喜欢

转载自jnh.iteye.com/blog/1056939