Spring Web Flow#
Spring Web Flow (SWF) is a self-contained library which manages the flow of a multi-request sequence of operations performed by a single user of a webapp. The configuration is managed by an XML-formatted file listing the states and transition conditions forming the flow - this may make use of OGNL expressions to express complex predicates. SWF is an official SpringFramework subproject.
Spring Web Flow is a form of "universal" application definition, whereby the application's structure becomes freed not only from a dependence on a particular web technology, but also on a particular delivery environment and even, in theory, programming language.
RSF's integration with Spring Web Flow is treated on its own page at RSF-SpringWebFlow. This page includes notes about the integration work and porting the Phonebook SWF Sample App. This is a good place to start if you are looking at using web flows in RSF.
RSF benefits for SWF developers#
Key benefits SWF developers can gain from using RSF-SWF include:
- Pure HTML templating - previewable markup can be edited directly by designers, without non-standard tags and names
- A "Spring-only" world - all configuration files use standard Spring format and IoC is used throughout the framework and applications
- Universal portability - port all kinds of SWF applications and flows (both JSP-style and JSF-style) into a common environment
- Some courtesies - RSF-SWF defaults to "friendly" behaviour on submission errors, and comes out-of-the-box with refreshable flow end states
These benefits are detailed on the RSF for SWF page.
SWF benefits for RSF developers#
Key benefits RSF developers can gain from using RSF-SWF include:
- Centralised view logic - application logic and navigation are collected into a single, modular definition
- Isolated scopes - protect data from interference from outside the flow
- Safe modification - easily retrieve snapshots of previous flow-scoped data
- Universal portability - port all kinds of applications to other frameworks, including theoretically those in other languages
- Design tools - gain access to powerful application design functions such as the Spring-IDE flow editor
These benefits are detailed on the SWF for RSF page.
SWF sample applications#
Several of the Spring Web Flow samples
have been ported to the RSF-SWF environment. In each case the flow definitions and application structure are left intact. You can try out the RSF ports of SWF samples
on our server or check out the listing of RSF sample apps
This is the first SWF app ported to RSF. A detailed tutorial of porting the original SWF Phonebook sample
is available at PhonebookSWFSample
. Since this is in some ways the "core" SWF sample, around which much of the tutorial material is based, the port of this sample is referred to on the main RSF Spring Web Flow
page. Try this app
on our server.
Experience porting the Sell Item - A Spring Web Flow Sample
to run in RSF is documented on Porting Sell Item - RSF SWF sample
. This page will take you through the steps necessary to port a Spring web flow app to use RSF and will give you an idea of the work required. There are additional notes on the SellItemSWFSample
page and you can try this app
on our server.
SellItem JSF version#
As well as porting the basic Spring Web Flow sample, we also port the version of the application written using Spring Web Flow's JSF integration, sellItem-JSF to RSF-SWF. The flows in these two "Sell Item" samples are not the same, since the JSF version must defer to the JSF framework for binding. The differences between the two applications, and more advanced integration issues, are discussed on the SellItemSWFSample
Porting the Shipping Rate - An Ajax-enabled Spring Web Flow Sample
to run in RSF is documented on Shipping Rate - RSF SWF sample
. This is another example of the steps needed to port an SWF app to RSF. Try this app
on our server.
Hotel Booking #
The Hotel Booking application
is the sample delivered with the latest milestone M1 release of the upcoming Spring Web Flow 2.0. RSF-SWF is already compatible with this milestone release, and the sample has been ported to RSF, and is documented on Hotel Booking - RSF SWF sample
. This page demonstrates the use of the native RSF AJAX-enabled controls transparently within the SWF context, as well as RSF's new compact validation syntax.
Articles on Spring Web Flow#
Here are a few useful and comprehensive articles about Spring Web Flow: