Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22

Thread: Spring MVC vs. Struts 2 (WebWork 2)

  1. #11
    Join Date
    Jan 2007
    Posts
    4

    Default

    Hi guys...

    I'm a Java newbie so please handle with care....

    I'm required by my company to use Spring. However my friend suggest me to learn webwork b'cos it is the better than Spring. This thread seem to support his statement.

    Should I use Webwork instead of Spring MVC?

    ~thx4AnyReply
    ~sorry4BadEnglish

  2. #12
    Join Date
    Aug 2006
    Location
    Waukesha, WI
    Posts
    41

    Default

    Well, there is Spring the lightweight javabean container and there is Spring MVC which is the web framework closely associated with Spring. Webwork integrates very well with Spring the javabean container. Spring MVC also integrates very well with Spring the javabean container. If your company mandates Spring MVC, then you're probably stuck with it. If your company only mandates the Spring bean container, then you have the choice of using either Spring MVC or Webwork/Struts2. It's really up to you.

  3. #13
    Join Date
    Jan 2007
    Posts
    4

    Default

    well, actually, my company mandate me to use Spring because they don't know about WebWork, and I have a privilage to chose my own MVC IF I can state an acceptable reason. The problem is I'm quite sure that Spring is enough for my current task and I don't know how much effort I should do to migrate my system to WebWork MVC(and what tradeoff I should pay).

    Is is worth to try?

    ~thx4AnyReply
    ~sorry4BadEnglish

  4. #14
    Join Date
    Aug 2006
    Location
    Waukesha, WI
    Posts
    41

    Default

    If webwork is an option, I'd say that it is worth the effort of conversion if you are going to convert a significant percentage of screens. (Webwork and Spring MVC can live side-by-side to allow you to migrate gradually) You also have to weigh the retraining costs. (i.e. developers coming up to speed on the new framework) Then you have to decide if you should go with webwork or struts2. (Struts 2.0.x should be GA/production ready by the end of January)

  5. #15
    Join Date
    Jul 2006
    Location
    Kolkata, India
    Posts
    217

    Default

    Quote Originally Posted by svnstrk View Post
    Should I use Webwork instead of Spring MVC?
    Webwork, Spring MVC, Struts are action oriented frameworks as opposed to JSF and Tapestry which offer component based implementations. I would take a serious look at them as well. JSF is a standard for which the current problem is that almost all implementations suck. But with great support from the Seam community, we may have somthing to look seriously into. Irrespective of what u choose as the Web framework, keep an eye on the JSF integration points. The last time I checked, the integration of JSF with Spring MVC was not very mature. But, on the whole, Spring MVC is a very well designed framework with lots of hooks and customization points. It has very intelligent use of defaults - what the Ruby guys say *convention over configuration*. I am not sure though about SWF - how much will an XML based flow language scale .. Now that Seam is around, I would advise u to have a look there as well ..

    Cheers.
    - Debasish

  6. #16
    Join Date
    Aug 2004
    Location
    Melbourne, FL
    Posts
    2,794

    Default

    I am not sure though about SWF - how much will an XML based flow language scale
    I don't think XML has as much to do with scaling as much as modularity and encapsulation does. Spring Web Flow gives you a powerful ability to encapsulate UI control flow in an externalized module, then compose flows together to create rich user dialogs. It's specifically designed to scale, and solving the UI flow manageability problem was (and continues to be) one of the primary motivations for the project.

    Keith
    Last edited by Keith Donald; Jan 21st, 2007 at 07:08 AM.
    Keith Donald
    Core Spring Development Team

  7. #17
    Join Date
    Jul 2006
    Location
    Kolkata, India
    Posts
    217

    Default

    Quote Originally Posted by Keith Donald View Post
    I don't think XML has as much to do with scaling as much as modularity and encapsulation does. Spring Web Flow gives you a powerful ability to encapsulate UI control flow in an externalized module, then compose flows together to create rich user dialogs. It's specifically designed to scale, and solving the UI flow manageability problem was (and continues to be) one of the primary motivations for the project.
    Keith - By scaling, I meant scalability from usage point of view. Particularly with DSLs all over these days, declarative programming has certainly got a facelift. Functionally SWF is great and solves some very pertinent problems in Web programming. I was thinking if u guys have any plans to make the interface more user friendly than XML.

    Anyone for JRuby ?

    Cheers.
    - Debasish

  8. #18
    Join Date
    Aug 2006
    Location
    Waukesha, WI
    Posts
    41

    Default

    Seam has some good stuff in it, the struts2 guys are definitely keeping an eye on it. Also struts2 has a JSF plugin which gives limited JSF functionality in struts2: http://cwiki.apache.org/S2PLUGINS/jsf-plugin.html

    Although I can't figure out how you would define the state machine logic other than xml or programmatically, I do think there are opportunities for improved integration. As an example of this, I create a AnnotationFlowScopeInterceptor that allows flow scoped variable to be bijected (a seam term) via annotations. This greatly simplifies the process of specifying the items that should be stored in flow scope.
    http://cwiki.apache.org/S2PLUGINS/sp...ow-plugin.html

    The nice thing about SWF is that if someone does come up with a better way of specifying flow logic, there are hooks into the framework to allow it to integrate with the existing code. (All you really need to do is to create an adapter)

  9. #19
    Join Date
    Aug 2007
    Posts
    2

    Default Struts Still Rocks in MVC

    I have used both Spring and Struts 2 MVC in web applications. Personally I prefer struts 2 over Spring because it became so easy to adopt and do stuff really quickly with a more enriched tag library where Spring MVC has way to catch up. I don't know why people don't use Struts 2 that much. Anyway all good stuff in spring and Struts 2 for MVC will be a good path to go.

  10. #20
    Join Date
    Aug 2006
    Posts
    143

    Default

    Separate from 'which is better', does anybody know of statistics comparing how many developers use Spring MVC vs Struts 2?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •