File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes should we learn hibernate ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "should we learn hibernate ?" Watch "should we learn hibernate ?" New topic

should we learn hibernate ?

Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
hi, i hear that hibernate is good to use for replacing normal jdbc query ...can anyone comments this ?

we are currently starting a new project which is based on j2ee , some of the staff are suggest hibernate , but our team don't have many people know this technology , is this technology worth to replace jdbc query ?

thank you very much for your advice
Horatio Westock
Ranch Hand

Joined: Feb 23, 2005
Posts: 221
I'm currently reading "Hibernate - a developer's notebook". And I have to say that Hibernate looks pretty good. I think if I were starting a new project, I would seriously consider using something like Hibernate.

The best place for more info is probably the Object-Relational Mapping subforum. There have been lots of discussions of the merits of Hibernate and other ORM tools recently.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63869

Moved to ORM.

[Asking smart questions] [About Bear] [Books by Bear]
Sathya Srinivasan
Ranch Hand

Joined: Jan 29, 2002
Posts: 379
I have been using Hibernate for the last 5-6 months extensively.

Here are my recommendations:

The learning curve to Hibernate is low if
1. Your database is structured nicely with good normalization and well-defined primary keys.

2. Most of your queries are fairly straightforward (even if it includes a lot of joins)

3. If you haven't been asked to use the Entity Beans part of EJB. Hibernate is an equivalent of CMP/BMP section of EJB.

While Hibernate works great even otherwise, the learning curve may be a bit longer for more complex scenarios.

That said, the help in Hibernate forum and the two books that are out there (Hibernate Reference - free, and Hibernate In Action by Manning) are very good.

Cheers, Sathya Srinivasan - SCJP 1.2, SCWCD 1.2, SCMAD 1.0
Co-Author of Whizlabs SCMAD Certification Exam Simulator and SCMAD Exam Guide Book
Pj Murray
Ranch Hand

Joined: Sep 24, 2004
Posts: 194
The simple answer is: yes, learn Hibernate. It has good prospects - and EJB 3.0 will future-proof it for the near future.

The technology has clear market momentum - and there's clear market signs that the vendors of proprietary ORM products and also data persistence runtime product vendors with deployment fees are begining to panic.

One issue is that you do need to deal with is the steep learning curve. CodeFutures expects to be making an announcement in the near future that should help a lot with this issue. Stay tuned!

PJ Murray
CodeFutures Software
Java Code Generation for Data Persistence
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
Originally posted by Sathya Srinivasan:
the two books that are out there (Hibernate Reference - free, and Hibernate In Action by Manning)

Well, there's actually at least three books about Hibernate available from (the missing two are from Wrox/Wiley and O'Reilly).

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Dave Clark
Ranch Hand

Joined: Feb 16, 2005
Posts: 52
Another option is learning JDO rather than (or as well as) hibernate.

JDO queries are expressed in a syntax much like ordinary Java, so it's easy to do basic stuff really quickly, and then learn more of the intricacies (caching, disconnected object graphs, etc) as you go.

Both JDO and hibernate are about 90% of the same as the forthcoming EJB 3 POJO persistence. The main difference of course is that hibernate is a proprietary API implemented only by a single vendor, whereas there are a few dozen JDO vendors, including some pretty good free & open source implementations.

So JDO will more than likely be a better investment of time and effort learning, since there are plenty of JDO vendors to maintain compatibility with the JDO APIs and Spec, whereas developing against hibernate APIs will probably mean you'll *have* to migrate to EJB 3 in the future. Most JDO vendors on the other hand, will give you the *option* of migrating to EJB 3, by supporting both JDO 2 and EJB 3 persistence within the same product.



Dave Clark<br />Senior WebSphere Architect<br /><a href="" target="_blank" rel="nofollow">Versant Open Access - JDO2 & EJB3</a>
I agree. Here's the link:
subject: should we learn hibernate ?
It's not a secret anymore!