IntelliJ Java IDE
The moose likes Other Application Frameworks and the fly likes spring basic Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Other Application Frameworks
Reply Bookmark "spring basic" Watch "spring basic" New topic
Author

spring basic

ben oliver
Ranch Hand

Joined: Mar 28, 2006
Posts: 356
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é
Marshal

Joined: Nov 24, 2005
Posts: 14361

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

Please could you explain why you're against it ?


[SCBCD Wall of Fame] [My Blog]
All roads lead to JavaRanch
Help Japan. Make a donation.
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2906
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.


    "Don't succumb to the false authority of a tool or model. There is no substitute for thinking."
    Andy Hunt, Pragmatic Thinking & Learning: Refactor Your Wetware p.41
    Christophe Verré
    Marshal

    Joined: Nov 24, 2005
    Posts: 14361

    Thanks Peer, those PDFs are great.
    Peer Reynders
    Bartender

    Joined: Aug 19, 2005
    Posts: 2906
    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.
     
     
    subject: spring basic
     
    Threads others viewed
    Why so many frameworks?
    Suggestion for Subject prefix convention
    To the authors: JSF & the other frameworks
    what is the Best Frameworks combination Spring-Struts-Hibernate, or JDO, or etc...
    relation between JSF and struts, tapestry ?
    developer file tools