aspose file tools*
The moose likes Other Application Frameworks and the fly likes spring basic Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "spring basic" Watch "spring basic" New topic
Author

spring basic

ben oliver
Ranch Hand

Joined: Mar 28, 2006
Posts: 375
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

Joined: Jul 18, 2001
Posts: 2712
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

Joined: Nov 24, 2005
Posts: 14687
    
  16

in fact I would recommend against using Spring MVC for your web framework

Please could you explain why you're against it ?


[My Blog]
All roads lead to JavaRanch
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
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

    Joined: Nov 24, 2005
    Posts: 14687
        
      16

    Thanks Peer, those PDFs are great.
    Peer Reynders
    Bartender

    Joined: Aug 19, 2005
    Posts: 2922
        
        5
    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.
     
    It is sorta covered in the JavaRanch Style Guide.
     
    subject: spring basic