Learning Web Flow With Spring

Web flow is the most confusing part so far in RIA with Spring training, therefore a whole day was dedicated to this.

From a very high level, a Web flow is just like a wizard in a stand-alone application. It guides a user through several steps of interactions. Complicated wizards may branch out depending on the information entered in early steps, so do the Web flows.

Lost VMs or Containers? Too Many Consoles? Too Slow GUI? Time to learn how to "Google" and manage your VMware and clouds in a fast and secure HTML5 App.

Well, Web environment has its uniqueness and challenges. Spring Web Flow is designed to ease it. Like any other framework, you have to overcome the learning curve before you can really take advantage of it.

The good news is the Web Flow still fits in the MVC framework overall, just with a new set of handler mapping, handler adapter, plus the new flow executor.

When a user clicks out a new flow like submitting a reward application, the Web container first looks the URL pattern and forwards it to the DispatcherServlet of the corresponding Web app. The DispatcherServlet queries FlowHandlerMapping, which looks up FlowRegistry, for a FlowHandler, then lets the FlowHandler to handle it. The handler starts a new FlowExecutor which follows through the whole flow.

While in a web flow, the URL carries the information of the step it’s in like this:

http://localhost:8080/webflowactions2 /admin/rewards/newReward?execution=e2s5

The string after the execution has a pattern like e*s*, where the first * is the execution instance number, and the second is the step number which does not necessarily correspond to a particular page. It’s more for the executor as a key than for human being.

With the Spring Web Flow framework in place, all you need is to author the flow with flow definition file, flow views, etc. The flow definition involves the view states, transitions between states, additional behaviors. For advanced web flows, you can even define flow inheritance. Sound like OO? Close, but not the same. The inheritance is just for composing purpose.

For more on the Spring Web Flow, here is a good link to its project home.

This entry was posted in Software Development and tagged , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *


You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>


    My company has created products like vSearch ("Super vCenter"), vijavaNG APIs, EAM APIs, ICE tool. We also help clients with virtualization and cloud computing on customized development, training. Should you, or someone you know, need these products and services, please feel free to contact me: steve __AT__ doublecloud.org.

    Me: Steve Jin, VMware vExpert who authored the VMware VI and vSphere SDK by Prentice Hall, and created the de factor open source vSphere Java API while working at VMware engineering. Companies like Cisco, EMC, NetApp, HP, Dell, VMware, are among the users of the API and other tools I developed for their products, internal IT orchestration, and test automation.