• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate or iBatis

 
David Feitosa
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I start to learn Spring, and it has support to Hibernate and iBatis. Who is the best to work? I never see iBatis before. Anybody knows any article that do an comparison? thanks.
 
Dave Trussell
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by David Feitosa:
Anybody knows any article that do an comparison?


Comparison:
http://c2.com/cgi-bin/wiki?ObjectRelationalToolComparison
 
Christian Bauer
author
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They are different and each can be useful, depending on your architecture and/or process.

iBatis is a lightweight mapper, you have full control over all SQL executed (you have to write it yourself) which is very helpful in situations with lots of stored procedures and business logic already existant in the database system. iBatis maps result sets to object graphs and offers some abstraction of the underlying/externalized SQL.

Hibernate is a "full" object/relational mapping tool that is most efficient if used with business logic/domain models in the Java application tier and a normal entity-driven (and hopefully sensible) data model in a SQL database. Hibernate then automates any persistence operations (loading, saving, querying for objects, etc.) for you and offers many interesting optimizations (caching, lazy loading, eager fetching, batch fetching) which are difficult to achieve in a hand-written persistence layer. I'd say it is a bit harder to use Hibernate with very old/broken legacy database schemas but that changes now with Hibernate3, which also offers you to completely hand-craft the SQL that is executed while still giving you many features that make your work easier.
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Dave Trussell:


Comparison:
http://c2.com/cgi-bin/wiki?ObjectRelationalToolComparison


Oh.. It's good link.
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
iBatis is a lightweight mapper, you have full control over all SQL executed (you have to write it yourself) which is very helpful in situations with lots of stored procedures and business logic already existant in the database system. iBatis maps result sets to object graphs and offers some abstraction of the underlying/externalized SQL.


iBatis can call store procedure or can create store procedure in mapping file like as Hibernate ??
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have access to the JDBC from iBatis than indeed you will be able to call stored procedures.

As for creating stored procedures from mapping files in Hibernate, I know nothing about this... is it really possible?

./pope
 
Gavin King
author
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it is possibe in Hibernate3.
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Gavin King:
Yes, it is possibe in Hibernate3.


OK, Ready to Hibernate 3.0 but now it's alpha version...

When Hibernate3 will final release ?
 
Gavin King
author
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are not completely sure yet, but we will have a beta very soon.
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You never have enough of Hibernate Gavin, ain't you? Me tooooo :-).

./pope
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic