GeeCON Prague 2014*
The moose likes Spring and the fly likes is a good buy for me ? (coming from JSF and JPA) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Spring
Bookmark "is a good buy for me ? (coming from JSF and JPA)" Watch "is a good buy for me ? (coming from JSF and JPA)" New topic
Author

is a good buy for me ? (coming from JSF and JPA)

Oriol Boan
Greenhorn

Joined: May 30, 2009
Posts: 15

Hello everyone,

first of all, thanks to Ahmad Seddighi for promoting his book in this forums.

Now, the question: I've been working in JSF and JPA projects, but never with Spring and Hibernate, so I'd like to know if this is a book targeted to someone like me, i.e., with good skills in other j2ee frameworks but newbie in those the book is focused on.

I also wish some brief advice about whether I may start working with Spring and / or Hibernate when I've always had enough and been very successful with JSF and JPA, so what advantages I will find if I try Spring and Hibernate (over using JSF and JPA).

The answer to this will help me out to decide if a book like this could be a good buy.

Thanks!


www.orboan.com
ahmad seddighi
Greenhorn

Joined: Jun 22, 2004
Posts: 16
Thank you, dear.
Yes. I think my book is a good book to start. It assumes you a beginner in the context and teaches you from beginner to advance.

Spring and Hibernate are not alternatives to JSF and JPA. With Hibernate you can still continue JPA development, but now with Hibernate implementation. And with Spring you can work with JSF more easily than before.

Good Luck,
Spring Persistence with Hibernate
Anil Vupputuri
Ranch Hand

Joined: Oct 31, 2000
Posts: 527
Oriol Boan wrote:
I also wish some brief advice about whether I may start working with Spring and / or Hibernate when I've always had enough and been very successful with JSF and JPA, so what advantages I will find if I try Spring and Hibernate (over using JSF and JPA).


Like Ahmad said, Spring and Hibernate are not replacement to JSF and JPA, unless you want to replace JSF with Spring MVC.

Let's break down your question into two parts,

(1) Spring MVC vs JSF

This is widely discussed topic on the internet, Google search would yield more results. I found one nice
Link (little outdated but good)

Spring-MVC is MVC2 type based on request and response model similar to HTTP applications and JSF is an event based model.

Spring MVC is gaining more ground recently. If it is a new project then Spring MVC will have advantage to integrate with Spring and Hibernate easily.

If you have an existing application and want to use Spring MVC, you can still combine JSF (just for View) with Spring MVC's Controllers.


(2) Instead of seperating JPA and Hibernate, take advantage of combining together and unleash the power of two.

JPA is from Sun, this is very popular and lightweight framework to overcome all the difficulties encountered with EJB2.
One nice feature it has is Annotations (avoids lengthy deployment descriptors) and can be used outside of the container. And it has nice feature of plugging-in third-party persistence providers such as Hibernate.

Mostly, people do not use the JPA API alone to work with persisted objects, rather, JPA annotations are only used to define the ORM mappings. JPA here is very trivial.
By using standard JPA annotations to markup a set of POJOs and then persist the POJOs by configuring Spring to use the Hibernate.


SCJP 1.5, SCEA, ICED (287,484,486)
Oriol Boan
Greenhorn

Joined: May 30, 2009
Posts: 15

Thanks to both for your brief, clear and useful comments.

I'm currently involved in a data mining project, but when I finish it, I decided to start my Spring and Hibernate learning... so at least I will need a good book on this subject.

thanks again

 
GeeCON Prague 2014
 
subject: is a good buy for me ? (coming from JSF and JPA)