File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes What is the difference between Spring, Hibernate, JSF, Struts etc. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "What is the difference between Spring, Hibernate, JSF, Struts etc." Watch "What is the difference between Spring, Hibernate, JSF, Struts etc." New topic
Author

What is the difference between Spring, Hibernate, JSF, Struts etc.

gurpeet singh
Ranch Hand

Joined: Apr 04, 2012
Posts: 923
    
    1

couldn't decide in which forum to post this question but finally decided to post here. i have recently cleared ocpjp and i have good knowledge about servlets and jsp. these days i'm reading alot about jsf, hibernate, ejb, struts, spring. i'm just reading them online like for example on wikipedia as to WHAT THEY ARE. the more i read the more i got confused as to - do they all fall in different umbrella or the boundaries between them are like fusing into each other. what i want to say is that is there any clear differentiation between them for e.g hibernate is an ORM tool whereas jsf is not. i have read that whatever you can do with hibernate you can do with ejb also. same thing heard for spring and struts. can somebody give me high level view of these technologies.

secondly i'm jumping in this vast oceans of framework. i thought about starting with struts 2 and hibernate parallely. i have bought manning titles for the same. do i need to have knowledge about jee design patterns for learning them ? how would you recommend where i should start. ? my next target would be spring ? how much is the learning curve for spring ? again where to start ?


OCPJP 6(100 %) OCEWCD 6(91 %) OCPJBCD(93%)
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Hi Gurpeet. I changed your title to something more appropriate. Typically, if someone posts "urgent" in their title, their question never gets answered because to everyone their own questions are urgent, and why is your question more urgent than theirs, and therefore don't want to help you out.

Anyway, yes there is some overlap and some differences between all the different Java technologies that you mentioned.

So are frameworks for application development, some just web frameworks, some both.
Some are just for Data Access. Some are just specifications and there are many implementations out there.

So what you need to look at first to figure out what that means is to look at the typical architecture for an enterprise Java Applications and what a layered architecture means, and what each layer is responsible for. Then we can kind on lay the technologies down on those layers and see what layers they cover.

First, a layered enterprise Java application typically have a service layer for business logic code, and DAO/Repository layer for querying for data. There is an infrastructure layer to deal with Transactions and DataSource Connections. Then your UI layer goes on top of your service layer and could be a Swing UI, a web layer, or many other technologies that might not have a UI at all.

so say from top to bottom layers

Web Layer

Service Layer

Dao Layer

Infrastructure Layer

Data storage


So now that we have that architecture what about those java technologies. First Java EE, this is a specification that defines JSF, EJB, JSP, Servlets etc. It used to also include JPA. So Java EE is basically a bunch of technologies for enterprise Java apps. So EJBs could be used for the Service layer, JSP/Servlets or JSF for the Web Layer, and JPA for DAO Layer. Since it is a spec JPA has many implentations, Hibernate for one implements JPA and more, so therefore you could use Hibernate as JPA.

The Spring Framework is like Java EE, in that there are many technologies that Spring helps with and covers, and can be used instead of Java EE which sometimes is too tightly coupled in code and environment.

Struts is a Web Layer framework. Meaning it covers the Web UI parts.
Spring has a Web Layer framework too called Spring MVC.

Hope that helps clear things up so that you can continue your studies.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
gurpeet singh
Ranch Hand

Joined: Apr 04, 2012
Posts: 923
    
    1

Thanks alot Mark. that one explanation of yours cleared so many of my confusion and helped me to put in right direction. with so many technologies, framework out there i was so scared and my confidence level was shaking. but thanks to you i have a much much better picture.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

gurpeet singh wrote:Thanks alot Mark. that one explanation of yours cleared so many of my confusion and helped me to put in right direction. with so many technologies, framework out there i was so scared and my confidence level was shaking. but thanks to you i have a much much better picture.


Yeah, I know, it is never ending. I have been learning more Web UI technologies recently with HTML5, CSS3, and JQuery. And even in the JavaScript world there are so many frameworks out there and they each work differently, the first thing is always what is the architecture.

Good Luck

Mark
Arun Giridhar
Ranch Hand

Joined: Mar 10, 2012
Posts: 142

Mark, need to add couple of +1 ! ... GQ gurpeet singh.


Join IRC freenode ##javaee channel.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is the difference between Spring, Hibernate, JSF, Struts etc.
 
Similar Threads
Spring - Hibernate beginner information
what technology to choose in my project/career ?
Transactional DB access without EJB
Tapestry and longevity...
Is JSF technology the EJB 2.0 of the web?