Diff between struts and spring

Discussion in 'Java' started by lalit, Jul 12, 2006.

  1. lalit

    lalit Guest

    Hi Everyone,
    I want to know the difference between the struts and spring.
    Help me!

    Thanx & Regards,
    Lalit
    lalit, Jul 12, 2006
    #1
    1. Advertising

  2. lalit

    chandratondepu

    Joined:
    Mar 11, 2007
    Messages:
    2
    Difference between struts and springs..

    Difference between struts and springs could be analysed from various facets.

    (1) Purpose of each framework.
    (2) Various feature offerings at framework level.
    (3) The design & stuff.

    Firstly, Struts is a sophisticated framework offering the easy 2 develop, structured view/presentation layer of the MVC applications. Advanced, robust and scalable view framework underpinning reuse and seperation of concerns to certain extent. Springs is a Lightweight Inversion of Control and Aspect Oriented Container Framework. Every work in the last sentence carry the true purpose of the Spring framework. It is just not a framework to integrate / plug in at the presentation layer. It is much more to that. It is adaptible and easy to run light weight applications, it provides a framework to integrate OR mapping, JDBC etc., Infact Struts can be used as the presentation tier in Spring.

    Secondly, Springs features strictly associate with presentation stuff. It offers Tiles to bring in reuse at presentation level. It offers Modules allowing the application presentation to segregate into various modules giving more modularity there by allowing each module to have its own Custom/Default Request Processor. Spring provides Aspect Oriented programming, it also solves the seperation of concerns at a much bigger level. It allows the programmer to add the features (transactions, security, database connectivity components, logging components) etc., at the declaration level. Spring framework takes the responsibility of supplying the input parameters required for the method contracts at runtime reducing the coupling between various modules by a method called dependency injection / Inversion of Control.

    Thirdly, Struts is developed with a Front Controller and dispatcher pattern. Where in all the requests go to the ActionServlet thereby routed to the module specific Request Processor which then loads the associated Form Beans, perform validations and then handovers the control to the appropriate Action class with the help of the action mapping specified in Struts-config.xml file. On the other hand, spring does not route the request in a specific way like this, rather it allows to you to design in your own way however in allowing to exploit the power of framework, it allows you to use the Aspect Oriented Programming and Inversion of Control in a great way with great deal of declarative programming with the XML. Commons framework can be integrated to leverage the validation in spring framework too. Morethan this, it provides all features like JDBC connectivity, OR Mapping etc., just to develop & run your applications on the top of this.

    If you have feedback / questions, pls. route them to chandrasekhar.tondepu(at)gmail.com.
    Happy Learning!
    chandratondepu, Mar 11, 2007
    #2
    1. Advertising

  3. lalit

    chandratondepu

    Joined:
    Mar 11, 2007
    Messages:
    2
    Have your replies send to chandrasekhar.tondepu(at)gmail.com
    chandratondepu, Mar 11, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Cyril Vi?ville

    diff Process under diff users

    Cyril Vi?ville, Jun 29, 2004, in forum: Perl
    Replies:
    1
    Views:
    509
    Joe Smith
    Jun 29, 2004
  2. Berrucho
    Replies:
    2
    Views:
    635
    Infant Newbie
    Dec 5, 2003
  3. Santa
    Replies:
    1
    Views:
    1,076
    Mark A. Odell
    Jul 17, 2003
  4. rmn190
    Replies:
    2
    Views:
    2,356
    Arne Vajhøj
    Jan 10, 2008
  5. Goldfish
    Replies:
    1
    Views:
    710
    Goldfish
    Nov 6, 2008
Loading...

Share This Page