• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

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

 
Ranch Hand
Posts: 924
1
Netbeans IDE Fedora Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
gurpeet singh
Ranch Hand
Posts: 924
1
Netbeans IDE Fedora Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mark, need to add couple of +1 ! ... GQ gurpeet singh.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thankyou for Mark for explaining and making everything visible and understandable in java. You are really appreciated sir.
 
I'm just a poor boy, I need no sympathy, because I'm easy come, easy go, little high, little low, little ad
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic