• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

spring basic

 
ben oliver
Ranch Hand
Posts: 375
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is Spring a frame work just like struts and tapestry ? what's special with Spring ?

If I want to use Hibernate then what's the framework I should pick ? Spring or struts/tapestry ?
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Spring is much more than a web framework... in fact I would recommend against using Spring MVC for your web framework. Spring is a "lightweight" container that provides many services in the same vein as J2EE but without the requirement of a full-blown J2EE Application Server. The heart of Spring is a solid IoC implementation which can be used independently or utilized to access some of Spring more advanced features. These include: AOP, ORM (supports Hibernate, Ibatis, JDO, OJB, and TopLink), Declarative Transactioning, Remoting, Scheduling, and other features.

If I were to start a new project with Hibernate I would definitely heavily consider using Spring. Spring makes interacting with Hibernate much simpler. However, I leave Spring on the busines/service layer of the equation and use a web framework such as WebWork for the presentation layer.
[ March 29, 2006: Message edited by: Chris Mathews ]
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in fact I would recommend against using Spring MVC for your web framework

Please could you explain why you're against it ?
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From Comparing Web Frameworks
Spring MVC
Pros:
  • Lifecycle for overriding binding, validation, etc.
  • Integrates with many view options seamlessly: JSP/JSTL, Tiles, Velocity, FreeMarker, Excel, XSL, PDF.
  • Inversion of Control makes it easy to test.

  • Cons:
  • Configuration intensive - lots of XML
  • Requires lots of Code in JSPs
  • Almost too flexible - no common parent Controller

  • Check also Java Web Framework Sweet Spots.
    Spring MVC also drove Max Habibi to write his article Evil Technology Rant. The ensuing discussion can be found here.
     
    Christophe Verré
    Sheriff
    Posts: 14691
    16
    Eclipse IDE Ubuntu VI Editor
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thanks Peer, those PDFs are great.
     
    Peer Reynders
    Bartender
    Posts: 2968
    6
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Credit should go to Gregg Bolinger and Chris Mathews in the struts and tapestry topic - and of course Matt Raible for creating the PDFs in the first place. I just parroted the information.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic