struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Husted <hus...@apache.org>
Subject Re: Hibernate VS ibatis, which is better?
Date Thu, 02 Sep 2004 11:17:15 GMT
On Thu, 02 Sep 2004 10:45:03 +1200, struts Dude wrote:
> Seeing so many support for either side,
> I might as well flip a coin to decide
> whether or not to learn hibernate.

As a technologies, both are easy-to-use and powerful. The difference is that they use different
paradigms. 

As it stands today, a team has three major choices in data access libraries:

 1. Roll your own persistence layer using the stock data access libraries (JDBC) 

 2. Use an Object-Relational-Modeling (ORM) Tool, like Hibernate or Apache OJB or Sun's JDO

 3. Use a Data Mapper framework, like iBATIS

Rolling your own with the stock libraries are a good choice for small applications with stable
requirements. (If you're lucky enough to have one of those!)

ORM tools (like Hibernate) are a good choice when:

 1. Have complete control over your database implementation

 2. Do not have a Database Adminisrator or SQL guru on the team

 3. Want to model the problem domain outside the database as an object graph

A Data Mapper (like iBATIS) is a good choice when:

 1. You do not have complete control over the database implementation, or want to continue
to access a legacy database as it is being refactored

 2. You have database administrators or SQL gurus on the team

 3. The database is already being used to model the problem domain, and the application's
primary role is help the client use the existing database model.

In practice, it has less to do with iBATIS or Hibernate, and more to do with what you're hooking
up with :)

HTH, Ted. 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message