Tuesday, February 06, 2007

iBATIS vs Hibernate

iBATIS works well when you need to integrate with an existing database.
Hibernate works well when you control the data model.

iBATIS maps Java Objects to the results of SQL Queries, whereas Hibernate maps Java Objects directly to database tables, traditional Object-Relational Mapping. The benefits of Hibernate are that it automatically generates all the SQL for your and the cache invalidation can be more fine grained. iBATIS is more flexible especially if you are a strong SQL query writer. You have control over exactly how the SQL queries are written.

Compared with Hibernate, iBATIS is more flexible, has a shorter learning curve, but can take more time to develop and maintain, since you have to write all your queries and if your object model changes you have to go through all your queries and make sure to make all the necessary changes to reflect the changes in your object model.

1 comment:

Free Blog Service said...

Totally Agree.
iBatis is good for small projects. It may have some difficulty in handling multiple databases at once. Ofcourse, hibernate is much powerful.

iBatis has very sort learning curve:
Interested user can learn iBatis in just 10 minutes.

iBatis in 10 minutes at Expert Developer Zone


Regards
Free Blog Service Network
Help Developers
Free Blog Service Network