• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

help sought in understanding struts, ejb , hibernate?

 
Ranch Hand
Posts: 924
1
Netbeans IDE Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
this may not be the right forum for this question . but i would like to know what is the difference between EJB and Hibernate and EJB and Struts 2. ?
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As I pointed out in your earlier post, Struts, regardless of version, is an implementation of the Front Controller pattern.
EJB and Hibernate are primarily Object Relational Maps, used to interface with databases (EJB's have a lot more functionality, for example, they do not necessarily have to be backed by a database table and can do other things like process messages from a queue).
 
gurpeet singh
Ranch Hand
Posts: 924
1
Netbeans IDE Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Joe Ess wrote:As I pointed out in your earlier post, Struts, regardless of version, is an implementation of the Front Controller pattern.
EJB and Hibernate are primarily Object Relational Maps, used to interface with databases (EJB's have a lot more functionality, for example, they do not necessarily have to be backed by a database table and can do other things like process messages from a queue).



i don't have much idea about j2ee design patterns, but does struts as an implementation of Front controller pattern means that it CANNOT be used in the business/infrastructure layer of our web application ? also what about spring ? can we use spring in both the presentation layer and business/infrastructure layer ?

can we say that spring is superset of struts in that it can do whatever struts 2 can do but not vice versa ?
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

gurpeet singh wrote:
but does struts as an implementation of Front controller pattern means that it CANNOT be used in the business/infrastructure layer of our web application ?



For the most part, yes, but that statement comes with a caveat: Struts has a lot of functionality that is not strictly part of the Front Controller pattern (the ModelDriven interface, for instance) that may intrude into the "business logic" part of an application.

gurpeet singh wrote:
also what about spring ? can we use spring in both the presentation layer and business/infrastructure layer ?



I haven't worked with Spring, but from what I understand it is a more comprehensive framework, including front end functionality (Spring Web) as well as back-end tasks (Security, ORM).

gurpeet singh wrote:
can we say that spring is superset of struts in that it can do whatever struts 2 can do but not vice versa ?



I would say that they are frameworks that take two different approaches to making developers more productive. You would be hard pressed to find a use case for Spring that could not be done in Struts. Whether or not it is easier with one framework or the other is left up to the developer to decide.
You can also use Spring in conjunction with Struts, to make the decision process even murkier.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic