Sunday, May 24, 2009

iBatis Vs Hibernate

Hi All,

I did a research on what framework to choose for the DB layer of the application as I had to migrate one of my applications to use one of the popular frameworks available. I performed the research on the two most popular open source products - iBatis and Hibernate. I am listing down the features of each one of them below,

Hibernate :
Object <-> Relational mappingsIt provides three different O/R mapping strategies. It allows associating multiple objects to a single table row. It supports polymorphic associations, bidirectional associations and association filtering. It also provides support for basic collection types.
Hibernate query languageIt provides query language that uses objects instead of tables and makes it easy for a developer to write queries.
Improves PerformanceIt has a feature of loading the child objects in a hierarchy only when it is used called lazy loading. It also provides a scalable architecture. Connection pooling and prepared statement caching is also possible.


iBatis :
Data MapperIt allows the developer to map the result set to the class using XML. The result set can be either from a direct SQL or stored procedure.
Performance TuningSince iBatis gives the full control of the SQL query generated to the developer, it helps in performance tuning of the queries where complex joins are required to fetch the data.
Ease of MigrationSince it accepts native SQL and Stored procedures, it is easy to migrate to iBatis without much effort. The learning curve is less here as the developer just need to know about the mapping of result-set with class.


iBatis Vs Hibernate :

No comments:

Post a Comment