1.

What Is The Difference Between Hibernate And Ibatis In Java?

Answer»

Hibernate and Ibatis both are the persistance FRAMEWORKS.

Hibernate will support for procedure invocations and to run normal sql but it is very difficult to make it possible with a normal developer. Where as iBatis is easy to develop and easy to call procedures and functions, no need to struggle for MAPPING and other things.

When we have multiple joins and complex queries in the application it will be difficult achieve with Hibernate. But it is very easy to handle in Ibatis.

Hibernate works if we have very well data model is well in sync with object model, because ORM solutions like Hibernate map objects to tables. If Object model is not in sync with the data model, in this case we have to do lot of additional coding and complexities are entering into your application.

When application becoming huge and complex our model starts breaking down.

One size does not FIT all. In such cases i like to use iBatis.

Ibatis MAPS maps results sets to objects. so no need to care about table structures. We can retrive the data the way we want. This solution words very well for stored procedures and works effectively for reporting applications etc…

Hibernate for every query result we should have a corrosponding mapping object. Ibatis we can use Collection objects like Map, List or ArrayList.

Use Hibernate : Your environment is DRIVEN by object model which is sync with data model and object model wants to generate queries automatially. It is bit complex to implement.

Use Ibatis: You have freedom to write your own queries and easy to maintain. Your environment is driven by relational model. You can work on existing and complex scemas. Easy to implement.

Hibernate and Ibatis both are the persistance frameworks.

Hibernate will support for procedure invocations and to run normal sql but it is very difficult to make it possible with a normal developer. Where as iBatis is easy to develop and easy to call procedures and functions, no need to struggle for mapping and other things.

When we have multiple joins and complex queries in the application it will be difficult achieve with Hibernate. But it is very easy to handle in Ibatis.

Hibernate works if we have very well data model is well in sync with object model, because ORM solutions like Hibernate map objects to tables. If Object model is not in sync with the data model, in this case we have to do lot of additional coding and complexities are entering into your application.

When application becoming huge and complex our model starts breaking down.

One size does not fit all. In such cases i like to use iBatis.

Ibatis maps maps results sets to objects. so no need to care about table structures. We can retrive the data the way we want. This solution words very well for stored procedures and works effectively for reporting applications etc…

Hibernate for every query result we should have a corrosponding mapping object. Ibatis we can use Collection objects like Map, List or ArrayList.

Use Hibernate : Your environment is driven by object model which is sync with data model and object model wants to generate queries automatially. It is bit complex to implement.

Use Ibatis: You have freedom to write your own queries and easy to maintain. Your environment is driven by relational model. You can work on existing and complex scemas. Easy to implement.



Discussion

No Comment Found