Dear Spring Community,
This release firms up the Web Flow 2 architectural model, including how SWF 2 integrates with Spring MVC, JavaServerFaces, and Ajax. It also introduces many new features and improvements, including:
2.0 M4 New and Noteworthy
- The introduction of a simplified XML flow definition syntax. See the Spring Travel reference application for an example of the new syntax.
- Use of the version 2 syntax reduces the size of a version 1 flow definition by up to 50%. As an example, Spring Travel 1.0.5 consists of ~200 lines of flow-application code across six artifacts. The latest 2.0 M4 version consists of 93 lines of code across two artifacts, a 50% reduction with four less files to maintain.
- Savings are achieved primarily by stronger Expression Language (EL) integration and simpler tags for action execution and data mapping.
- Spring Security integration. Full support for securing flows, states, and transitions is provided.
A new "currentUser" EL variable makes it easy to reference the authenticated Principal from a flow definition or view template.
- Flexible support for flow exception handling inside Spring MVC, including default support for automatically restarting ended or expired flows.
- Support for handling Ajax events that do not change the current page. A new "render" element allows you to selectively re-render fragments of a page after handling an Ajax event.
- View variables. A view variable allocates when its containing view-state enters and goes out of scope when the state exits. These variables provide a page context and are particularly useful for updating a model over a series of Ajax requests from the same page.
- @Autowired flow variables. Flow variables may now have their dependencies @Autowired by Spring, enabling them to hold references to Spring-managed @Services. References to services are automatically re-wired for you between requests after variable deserialization.
- A common interface for Ajax, regardless of which toolkit is being used under the covers
- An aspect-oriented-like API for decorating HTML DOM nodes with behaviors, including client-side validation behaviors.
- Support for rendering JSF views in a standard Spring MVC environment. This enables Facelets templates to be rendered by plain Spring MVC Controllers as well as Flows.
Please see the Spring Travel reference applications included in the release for practical demonstrations of all these features. The reference projects are directly importable into Eclipse as Dynamic Web Projects.
A special note to existing Web Flow users: The upcoming 2.0 RC1 will provide support for version 1 flows in a version 2 environment. This will allow 1.0.x flows to run unchanged along side version 2 flows in the same application.
Enjoy! 2.0 final is right around the corner.
Web Flow Technical Lead