Summary
The Spring Web Flow 2.0's goal is to provide a universal application controller engine. The milestone release also includes flow-managed persistence contexts, better support for JSF, and Unified Expression Language support.
Advertisement
Spring Web Flow's main object has always been to provide a general application controller framework, where controller modules—flows in Spring's terminology—can be executed in any environment. The newly released 2.0 milestone brings the project closer to that goal:
The overall goal of Spring Web Flow 2.0 is to formally take the product from what it is today, a framework used primarily to implement linear wizards, to what it was always designed to become: a universal application controller engine for powering all types of client interactions. Such interactions include wizards, stateless "RESTful" interactions, and finer-grained, non-linear/asynchronous interactions often present in a "web 2.0" application...
Spring Web Flow 2.0 will provide the Spring community with a unified application controller framework and runtime, suitable for executing all types of client interactions, and capable of integrating a variety of view rendering technologies and UI component models. This unified runtime will enable consistent application of management instrumentation, security, AJAX, and managed persistence, among other unique features.
A key new feature in 2.0 is what the project documents describe as flow-managed persistence:
Spring Web Flow 2.0 M1 introduces support for Flow Managed Persistence Contexts with Hibernate and JPA. The new Hotel Booking Sample application included in the release demonstrates this feature. Here is how it works in the context of the booking sample:
When a new hotel booking flow begins, a persistence context is created for you automatically.
As you progress through the flow, the persistence context is used for all data access operations automatically. You do not have to worry about locating the flow-bound EntityManager instance, or managing it in any way.
When you authorize a booking, all changes to managed persistent entities are committed and flushed back to the database automatically. If you choose to cancel your booking, none of your changes are committed.
Version 2.0 also includes the Spring Faces module that contains a factored-out version of previous Spring Web Flow and JSF integration. Various decorator classes are provided, for instance, for integration with the Ext JavaScript library project's widgets. The release also contains support for the Unified Expression Language.
What do you think of Spring Web Flow's goal of providing a universal controller engine?