Mock tests, Interview questions, Tutorials and Tech news
 
 
Home > Programming / tutorials > Is Spring Web Flow Right for Me ?

Is Spring Web Flow Right for Me ?

Web based application beyond a size become complex to manage. Page definitions,  managing application flow , state management , orchestration of all this become a difficult task. That is why we have frameworks to ease out this task for us.

One of the choices which come to mind is Spring webflow.  Spring webflow is for management of page flow , navigation and state management. It is not an full fledged MVC framework like JSF 2.0 or Apache Struts.

You might get confused by the definition of Spring webflow on its home page

Spring Web Flow is the project in the Spring Portfolio that focuses on providing the infrastructure for building and running rich web applications. As a Spring project, Web Flow builds on the Spring Web MVC framework to provide:

  • A domain-specific-language for defining reusable controller modules called flows
  • An advanced controller engine for managing conversational state
  • First-class support for using Ajax to construct rich user interfaces

Be very clear on your requirements. Do you really need all these features which Spring webflow offers ?

Some features which I liked in Spring webflow 1.0 was the state management and navigation. Did not use Spring webflow for any other task beyond that.

In state management,  one of the neat features was Flow scope which allowed the data to live for a use case or a flow. This was less than session and more than request.  Perfect for some of the situations we had.

But if you have simple  web application, free flowing links it is not advised. Also if you are using JSF2 or any other similar framework, it does not make sense to go with Spring webflow and introduce complexity in application

From Spring Confluence page , Is Spring web flow right for me

Spring web flow is not a one-size-fits-all solution. It is a powerful system to implement controlled navigations that represent user conversations that drive business processes. It is not ideally suited for web sites that require a lot of free browsing.

Another good documentation on web flow is here

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Mixx
  • Google Bookmarks
  • IndianPad
  • Reddit
  1. June 10th, 2010 at 09:18 | #1

    Niel excellent inputs. Yes I agree that one of the biggest challenge is learning curve. And at that point organizations ask what is the real benefit which lies here.

  2. June 10th, 2010 at 09:14 | #2

    I really like the “controlled navigations” explanation of SWF. I have worked with a dozens of SWF projects, and what I have found is that a typical web application can have portions that need to “free browsing” and other parts need “controlled navigation” (i.e. registration, checkout, business processes). Fortunately SWF co-exists very nicely with Spring MVC, so you can use MVC for the free browsing portions of the application, and SWF for the controlled navigation portions.
    Unfortunately I think one of the biggest deterrents to SWF is the learning curve. While it’s not a major shift in approach (compared to MVC), it does require thinking about the application flow a little bit more in the beginning and understanding the mechanics of SWF. I’ve chatted with a lot of Spring development shops (small and large), and getting started seems to be the hardest part. This was the major motivation for adding Spring Web Flow scaffolding to MyEclipse for Spring, so that you can generate ready-to-run contextual examples using your own domain model (either POJO’s or databases).

  1. No trackbacks yet.
Get Adobe Flash playerPlugin by wpburn.com wordpress themes