Tuesday, March 7th, 2006

Spring Web Flow 1.0 Released with Ajax Integration

Category: Java, Toolkit

<p>Spring Web Flow (SWF) 1.0 EA, the proposal for what will become Spring 1.0 final, has been released.

Among other new features, this release showcases integration of Spring Web Flow with Ajax technology. Specifically, the “Shipping Rate” sample application included in the release distribution illustrates how to use the Prototype JavaScript library to embed a flow within a zone of a page.

The sample flow is a wizard that makes Ajax calls to the server to complete processing. This wizard takes the details about a package shipment over several steps and on completion calls a backend service to calculate the shipping rate:

The techniques demonstrated are:

- Creating a single flow definition responsible for conversational state management and response orchestration of the ‘shipping rate’ task portable accross Struts, Spring Servlet/Portlet MVC, and JSF environments:

- Using a JavaScript component to submit regular forms through an AJAX request, and inserting the HTML received from the server into a DIV tag.
- Submitting the _flowId request parameter to tell the flow controller which flow needs to be launched:

- Submitting the _flowExecutionKey and _eventId parameters to resume a launched flow to tell it what happened in the current state of the conversation:

In summary, with Spring Web Flow 1.0 EA and onward it is possible to launch, participate in, and query ongoing conversations that represent discrete, stateful, portable user interactions with the server using Ajaxian techniques. Expect additional patterns, best practices, and examples to emerge to further showcase this integration in the near feature; contributions and feedback in this area are welcomed and encouraged.

Additional Information

Spring Web Flow is a product of the Spring community focused on the definition and execution of page flow within a web application.

The system allows you to capture logical page flows as self-contained controller modules that are reusable in different situations. The system is ideal for web applications that guide users through controlled interactions that drive business processes. These user interactions, or conversations, typically span HTTP requests and may be dynamic and transactional in nature.

As an embeddable page flow engine, SWF integrates with existing frameworks such as Spring MVC, Spring Portlet MVC, JSF, and Struts. Flow definitions are reusable accross environments without coupling developer application code to Spring Web Flow APIs.

The new and noteworthy for the 1.0 EA release are major and outlined in detail in the original springframework.org announcement.

Related Content:

  • Spring Web Flow
    Spring Web Flow (SWF) is an emerging module of The Spring Framework. The module is part of Spring’s web application development stack, which...
  • Sun releases Ajax framework
    Sun Microsystems Inc. announced the release of jMaki 1.0 a client/server framework for Ajax that part of the Sun Web Developer Pack (SWDP). The new...
  • Spring Webwork2 Integration
    Trying to work out the best way to integrate Spring and Webwork2? One fellow discovered multiple ways in which you can use Spring-managed beans from...
  • Spring Web Services 1.0 released
    Spring Web Services 1.0, a comprehensive Web services stack for developing and consuming SOAP and POX (Plain Old XML) Web services, is now available...
  • Spring Batch Overview
    Despite the growing momentum behind SOA and real-time integration, many interfaces are still flat file-based and therefore best processed through a...

Posted by Dion Almaer at 9:50 am
Comment here

+++--
3.7 rating from 72 votes

Comments Here »

Comments feed TrackBack URI

Leave a comment

You must be logged in to post a comment.