Hibernate or iBatis


General J2EE: Hibernate or iBatis

  1. Hibernate or iBatis (3 messages)

    I have just joined a team that is starting to build an architecture based on multiple components that will facilitate and old DBMS and a new developed DBMS. Most of the direction was towards a straight JDBC framework. But I just came form a project that utilized Hibernate. Hibernate was very powerful and fulfilled a majority of the requirements, with only one issue that we ran into. We had created all our own integration to work with Hibernate, but really wanted to use Spring. So at my new company, I am suggesting Spring, but I am uncertain whether Hibernate or iBatis is a better solution. Hibernate is awesome in its capabilities and the limited amount of HQL that is required to produce so many of the CRUD operations. iBatis is an excellent choice as well because the framework could work with both our Java and .Net code, and utilizes SQL instead of requiring a new language to learn. Currently our database is horribly normalized...to receive improvements through a rewrite...but in the interim, both databases will need to be utilized. Can anyone lend me any thoughts as to why they would choose one over they other?



    Threaded Messages (3)

  2. Hibernate or iBatis[ Go to top ]

    I think you've identified the key difference between the two frameworks - HQL vs vendor SQL. At the end of the day, HQL, like JDOQL and EJBQL cannot take full advantage of vendor-specific DB features, such as Oracle pl/sql. The question is, do you frequently use those vendor-specific features? If so, I think Hibernate must be ruled out. If you only use vendor features rarely, Hibernate can be used. In general, it seems more powerful and robust than iBatis, so I would prefer to use it if you can get around the learning curve.

    On our project we had a lot of complex procedures which benefitted from a lot of custom PL/SQL so we chose iBatis. Its is also much easier for developers to learn than Hibernate.

    However, its worth noting that Hibernate 3 (currently in Beta) will support vendore-specific calls. When that happens, I think iBatis may struggle to compete.
  3. You may want consider O/R Broker also. It's similar to iBatis in that it externalizes SQL statements (even outside the XML for better reuse and readability), but is much more flexible in how it allows mapping of true POJOs, not just JavaBeans. It also integrates easily with Spring.
    Version 2.0 is currently in beta:
  4. Hibernate or iBatis[ Go to top ]