Announcement Announcement Module
Collapse
No announcement yet.
Spring MVC versus Web Flow Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring MVC versus Web Flow

    Are there any recommendations around when one should choose Spring MVC versus web flow? Is there anything web flow can do better than MVC or vice versa, given that FlowController extends from the existing MVC AbstractController?

  • #2
    Well for starters you shouldn't use FlowController

    I suggest the webflow reference guide as that answers that questions.

    Basically, for simply 1 or 2 screen functionality use MVC, for more advanced page flows/wizards use webflow.

    Comment


    • #3
      I have seen pretty complex applications designed (and a very good design too ) with Spring MVC in my web farm. It seems like Spring MVC for a 1 or 2 page functionality will be overkill. I like the way web flow forces you to think about decision and branching points in your application before you even write a single line of java code but i am still trying to figure what will be the best use case for spring MVC.

      Comment


      • #4
        Which would probably be even easier if you would have done that with webflow. Saves you your own management of resources/objects (i.e putting/removing things from the session), copying ids along from controller to controller, saves you writing logic from preventing users to start at page 3 instead of the beginning, saves you writing code to prevent duplicate submits, correct page back behavior/support, long running conversations.

        Admitted you can all do this with Spring MVC but you would have to write a lot of (boilerplate) code yourself.

        In general if you have multi screen workflow use webflow as it is easier to implement and gives you a lot of control and power.

        Comment


        • #5
          Originally posted by maheshguruswamy View Post
          I have seen pretty complex applications designed (and a very good design too ) with Spring MVC in my web farm. It seems like Spring MVC for a 1 or 2 page functionality will be overkill. I like the way web flow forces you to think about decision and branching points in your application before you even write a single line of java code but i am still trying to figure what will be the best use case for spring MVC.
          You need to start with reading the documentation, as Marten suggests.

          SWF should be used only when your application has to implement a workflow that very specifically restricts the user's activity to a finite and strictly ordered sequences of steps. That is the whole idea of SWF. You must not use it for an application that allows (should allow) free page navigation. You will end up with horrendously complex "flow" definitions if you try to define webflow configuration for virtually any (all but infinite number of) combinations of user steps.

          Many applications use a combination of SWF and Spring MVC controllers. In such cases, an application launches a flow when a user click on a link/button that is supposed to start a restricting workflow. The rest of the free-navigation-type activities are controlled by regular controllers outside of the SWF engine. That is very common.

          Comment


          • #6
            application has to implement a workflow that very specifically restricts the user's activity to a finite and strictly ordered sequences of steps
            That was what i was looking..thanks guys!

            Comment

            Working...
            X