Current JPA version 2.1 was started in July 2011 as JSR 338. Java Persistence API (JPA) provides specification for managing the relational data in applications. Note: JPA implementation means that it follows the rules that have been specified in Java Persistence API’s specifications so that later if you don’t want to use Hibernate you can use some other provider that implements Java Persistence API and that can be done with a minimal code changes.Hibernate implements JPA (Java persistence API) that makes it worldwide acceptable. Its purpose is to relieve the developer from a significant amount of relational data persistence-related programming tasks.Hibernate is primarily used in Data Access Layer to persist our application data into the Database.Note: The story behind the name of Hibernate is “An object is sent to hibernation to a RDBMS, when it comes back (if it does) it wakes up from his hibernation".It supports the object oriented principles such as association, inheritance, polymorphism, composition and collections. Hibernate is a pure Java object-relational mapping (ORM) and persistence framework that allows us to map plain old Java objects to relational database tables using (XML) configuration files.Hibernate is an open-source and lightweight ORM tool that is used to store, manipulate and retrieve data from the database.Learning curve is short: Since we all have working experience in using Hibernate, and Hibernate is totally object orientated concept, it will shorted our learning curve. By automated object/relational persistence it even reduces the LOC.Ĭost Effective: Hibernate is free and open source – Cost Effective Maintainability: As hibernate provides most of the functionality, the LOC (Lines of Code) for the application will be reduced and it is easy to maintain. Productivity: Hibernate reduces the burden of developer by providing much of the functionality and let the developer to concentrate on business logic. It is literally one configuration parameter change. Portability: Hibernate portability across the relational databases is amazing. Hibernate spares you unnecessary database calls and in persistence state it is automated persistence then it still increases the performance. This is a major factor in achieving the high scalability.Ģ. Apart from this, ORM provides following benefits:ġ. Hibernate employs very aggressive, and very intelligent first and second level caching strategy. What are the advantages of using ORM tools like Hibernate? The main advantage of ORM like hibernate is that it shields developers from messy SQL. A number of commercial and open source Java ORM tools have achieved this level of quality. This level of functionality can hardly be achieved by a homegrown persistence layer it’s equivalent to months or years of development time. Efficient fetching strategies (lazy and eager fetching) and caching strategies are implemented transparently to the application. The persistence layer implements transparent persistence persistent classes do not inherit any special base class or have to implement a special interface. Full object mapping supports sophisticated object modeling: composition, inheritance, polymorphism, and “persistence by reach ability”.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |