wood burning stoves*
The moose likes Object Relational Mapping and the fly likes Why should I use Hibernate & Spring? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Why should I use Hibernate & Spring?" Watch "Why should I use Hibernate & Spring?" New topic
Author

Why should I use Hibernate & Spring?

Thilina Madhushankha
Greenhorn

Joined: Nov 30, 2011
Posts: 5

Hi Friends,

I hope someone will give me some clear answers for the following questions, considering the project I'm going to do.

#1. Brief explanations about both with any simple examples.
#2. Advantages & disadvantages of both
#3. Should I use both of them or I just need Hibernate?. How to decide?.
#4. Any conclusions
#5. Best books for beginners (I'd like to know if there any Head First books for these)

Thanks in advance
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3826

#1. Brief explanations about both with any simple examples

Well these serve two different purposes. Spring can be considered as a technology stack where you have support for multiple tiers/usage of the application (Web MVC, AOP etc...). Hibernate is a ORM tool where you used to map domain classes to relational database. And Spring itself has a good support for Hibernate by providing common templates. So you can use Spring for web tier (and any other requirements like AOP etc...) and use Hibernate for the persistence tier. I think this clarifies your next 3 questions?

#5. Best books for beginners (I'd like to know if there any Head First books for these)

No HF books as far as I know for these. But I think the documentation itself of each is very rich in that you can do a fairly good job with them.


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Thilina Madhushankha
Greenhorn

Joined: Nov 30, 2011
Posts: 5

At the moment, I'm studying both Head First OOA&D & Servlets & JSP books. I think that, with the time, I will realize how to use these technologies for my work.

Thank you very much for your explanation. That helped me.
 
 
subject: Why should I use Hibernate & Spring?