Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

Spring WebFlow Sneak Preview: Reuse and Framework Abstraction


advertisement
he Spring framework, a lightweight open source J2EE container previously featured on these pages, is about to introduce a significant new feature as part of its already impressive offering. With the next release (1.3 , scheduled for summer of 2005) Spring will officially incorporate Spring WebFlow, an innovative, high-level Web framework for creating and configuring reusable Web flows within a Web application.

Those familiar with Spring may mistakenly assume Spring WebFlow is the same as Spring MVC. It's not. Spring MVC is a lightweight framework for Web application development, while Spring WebFlow introduces a whole new value proposition. It enables Web application architects to focus on the more abstract concerns of Web application development: the structure of logical Web flows and the definition of Web event conditions. Furthermore, it introduces new concepts such as continuations (more on those shortly).

This article reviews some of the key concepts behind this upcoming framework, examining the major compositional elements of the flow markup language in the context of the sample login sequence flow, and explaining why WebFlow is an attractive framework. (Readers must have a basic knowledge of the Spring framework release 1.2.)

Spring WebFlow Concepts and Components

As a Web framework, WebFlow has advantages in both conceptual and practical terms. It is grounded in sound software engineering concepts that promote consistent and solid architectures, and its components are logical, easy to understand, and easy to work witheven on a large scale.

In fact, the framework is best suited for medium-sized to large applications development because its component model is optimized for architectural reuse and effective manageability and configurability.

Figure 1. WebFlow's State Machine

Case Study in Context

As a case study, this article examines the most common Web application flow, a Web authentication sequence, and uses some of its segments for demonstration. A Web authentication sequence consists of a login form, a registration form, authentication action, registration action, and rendering the results for these actions. This example focuses mostly on the configuration for the components that render the login form.

Automata-Based Architecture

Spring WebFlow is based on the concept of the Finite State machine, also known as a Finite Automata. User interactions and transitions within a Web application are modeled on the common state machine principles of states and transitionsa very popular model in software engineering (see Figure 1). Automata-based design is an interesting design choice, and it is likely to gain popularity among application architects for its clarity and disciplined approach to modeling Web interactions.

Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.