Results 1 to 4 of 4

Thread: comparing with Spring Web MVC

  1. #1
    Join Date
    Oct 2004
    Location
    Germany
    Posts
    143

    Default comparing with Spring Web MVC

    Hi,

    when comparing Spring Web MVC with Spring Webflow MVC for working with Model and Forms,
    in Spring MVC i used extended SimpleForm or MultiActionController, with WebFlow i have to use extended FormAction.
    Now in WebFlow i have a AbstractAction for adding Actions which where do something that is not model based. in Spring MVC the controllers have done this too.

    so can i say that the Conntrollers from Spring MVC are more or less the Actions in WebFlow or the Actions in Webflow are the controllers?

    but where is the benefit of WebFlow? If i have understand right, the only thing is, that the objects well be saved automaticly in a session and that i have only one url for the flow, so that a bookmark too that will always start at the beginning, with Spring MVC i can do the same but i have to save alle object states manuelly, and check if the flow have startet at the beginning, all at the controllers. is that right?

    if so, how would be the future of Spring MVC? for my new project i will always use WebFlow because i of this, and because it can be better drawn (more use of externel UML Objects) and it have allready Portlet Support, or why should i use Spring MVC (resources, speed)?

    thanks Gideon

  2. #2

    Default

    You're a bit off on the general ideas. If I was calling anything a "controller" in WebFlow, it would be the flows (the xml files, if that's how you're doing it). Spring MVC, for example SimpleFormController, is like a prebuilt flow that gives you hooks in different parts of it's hard-coded processing.

    SimpleFormController still has a place. Personally, I don't want to write new flows every time I just need to make a free-browsing, one-page form. For those situations, the behovior of SimpleFormController is exactly what I need. However, for anything more complicated then that, I'm hooked on WebFlow. Things that turn into an absolute nightmare with AbstractWizardFormController are a piece of cake with WebFlow. Plus, you get to use subflows, which is, I think, the most powerful feature.

  3. #3
    Join Date
    Sep 2004
    Location
    Leuven, Belgium
    Posts
    1,853

    Default

    I completely agree with what wiggles says: a Controller in Spring MVC is similar to an entire flow in SWF. The hook methods a controller provides (eg. doSubmitAction() in SimpleFormController) are similar to Action implementations used by a flow: they allow you to plugin custom logic.

    So a typical application will mix both Spring MVC and SWF. Use simple controllers like SimpleFormController when that is all you need. When you have more complex flow requirements, use SWF.

    Erwin

  4. #4
    Join Date
    Oct 2004
    Location
    Germany
    Posts
    143

    Default

    Hi,

    ok thank you, so i can say tha a controller in MVC have to tasks, flow and actions, with SWF i have a flow separatly from the actions, this is a nice thing, so you can reuse the actions in other flows.

    now my first flow is running well and i think i now what you mean, but by the way SWF have support for JSR-168, MVC doesn't.

    mfg Gideon.

Similar Threads

  1. Spring MVC Web Framework versus Struts
    By biguniverse in forum Web Flow
    Replies: 27
    Last Post: Aug 29th, 2012, 03:57 AM
  2. Replies: 5
    Last Post: Aug 9th, 2008, 05:30 AM
  3. Gaijin Studio for Spring MVC 0.9.2 Released
    By dadams in forum Announcements
    Replies: 8
    Last Post: May 30th, 2007, 10:48 PM
  4. A Spring Class Loader?
    By azzoti in forum Architecture
    Replies: 8
    Last Post: May 7th, 2005, 04:02 AM
  5. Replies: 14
    Last Post: Feb 21st, 2005, 05:41 PM

Posting Permissions

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