Spring Web Flow 1.0 Released
October 30th, 2006
For those who managed to miss it: Spring Web Flow 1.0 Released We've been using Spring Web Flow for almost 6 months now, and are generally content with it. Recommended if you're starting a new web project.
SWF, as it is called by its fans, takes care of all the dirty plumbing you have to do to manage state during the "flow" of the user interaction. Generally, a user can go from place X in more than one way. Place X expects some information to display useful information. SWF manages to give you (the developer) an overview of which information is sent out, and which information is expected.
An additional plus is the presence of continuations. In SWF, each screen is a 'state' in a state diagram. Continuations record the path you have followed to reach that state. So you can use the back button!
We have had only 2 problems with it: Hibernate integration isn't very straightforward (but then again, Hibernate is difficult to integrate in any web project that requires you to span transactions over multiple requests). We ended up using (an adapted version of) the OpenSessionInFlowListenerInterceptor. Great stuff, although it breaks the back button in most cases again.
The second problem was cleaning of transactions when a 'flow' was abandoned. We had to do some housekeeping stuff when the user closed her browser without clicking on the 'save' button first. (For those who care: we got past this by a rather nasty custom implementation of a FlowExecutionRepository, combined with a SessionListener)
All in all, we're very content to be able to tap into the existing flows that we have developed already, adding new entry paths and everything, without breaking a sweat. Very recommended indeed.

Leave a Reply