Announcement Announcement Module
No announcement yet.
Utilize Spring's JDBC Framework or iBATIS Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Utilize Spring's JDBC Framework or iBATIS

    I have been reading through the Spring Developer's Guide, J2EE Development without EJB, Spring in Action, and all the iBATIS documentation. I really like much of the DAO framework of Spring and the functionality that it provides. I am trying to help research the correct persistence framework for our group and have really been interested in iBATIS and Hibernate.

    On the subject of iBATIS and Spring, it appears that Spring provides exceptionally strong support for abstracting out the day to day garbage of JDBC through its Template pattern implementation and callback features. And even though iBATIS is more of an extraction (as far as data mapping), does it really buy you that much more functionality that Spring JDBC functionality? Even from the documentation iBATIS sets itself as quite different and simplistic from Hibernate (so I am definitely into Spring/Hibernate for complex and robust persistence). But for any part of my architecture that requires straight JDBC for performance/simplicity/stored procedures/or a relational model...couldn't this just be accomplished with Spring's JDBC framework? I just don't want to introduce three new frameworks (Spring, Hibernate, iBATIS) if Spring can provide most of the functionality iBATIS gives through programmatic abstraction as opposed to configuration abstraction.

    Hope that makes sense...because I will have another post with more questions.



  • #2
    My feeling is that I'd tend to use Spring's JDBC support for JDBC oriented tasks and OJB or Hibernate for Object-Mapping; iBatis is "nice" but it just doesn't seem (IMHO) to provide enough return for asking developers to learn a new framework.


    • #3
      iBatis is a great framework for mapping Objects to relational database using straight JDBC. iBatis Data Mapper is not as generic / powerfull as is Hibernate, but it allows to write specific JDBC queries, use stored procedures and optimize queries on a case by case basis.
      Spring JDBC Abstraction Layer "abstracts" the JDBC API calls. But, I think, is not usable to implement Objects to relational mapping as this will require you to write a lot of code, especially if you have a large domain model.
      Hibernate3 introduced some new improuvments to allow for using straight JDBC and stored procedures.