Introduction to Spring Web Flow

namibiancurrishInternet και Εφαρμογές Web

12 Νοε 2013 (πριν από 3 χρόνια και 7 μήνες)

84 εμφανίσεις

Introduction to Spring Web Flow

By
-

Bhavesh Ramesh Patira

bp2213@columbia.edu

What is Spring


First

Version

by

Rod

Johnson



Oct

2002
.

Release



June

2003
,

1
.
0



March

2004


Spring

involves

designing

applications

with

POJO's

(Plain

Old

Java

Objects)
.


Aims

to

ease

development

and

hide

complexity



Aims

to

reduce

renundancy

and

configuration

issues


Open

Source

Key Features


Framework of frameworks


Frameworks


Inversion of Control container


Aspect Oriented Programming


Data Access, Transaction Management


Model View Controller, Remote Access


Authentication and Authorisation


Testing
: Unit and Integration

What is Spring MVC



Implicit split up of MVC


Dispatcher Servlet forms the top layer


Domain Layer (Model)


User Interface Layer (View)


Controller


Web Layer


Service Layer

Finally! Spring Web Flow


Spring Web Flow 1.0 was released on October
25th, 2006


Spring Web Flow (SWF) is a component of the
Spring Framework's web stack focused on the
definition and execution of user interface (UI)
flow within a web application


Light Weight Container based IOC framework

The Flow Is King


Flow

-

set

of

web

pages,

a

set

of

windows

in

a

GUI


Flow
-

treats

conversational

scope

as

a

first
-
level

citizen
.



Helps

in

partitioning

conversations,

cleanup

etc
.


Implementation

Agnostic

-

flows,

states,

actions,

and

views
.



Accessible

Lexicon

-

http
:
//www
.
springide
.
org/project

Building Blocks


Flow



A

conversation


States



Encapsulation

of

Behavior

(Action,

View,

Subflow,

Decision,

End)


Transition



Allowed

Paths


Event



"something

that

happens"

within

a

state


Benefits


Best Practices
-


Develop

against

interfaces
.



No

Form

Beans!!!

Keep

it

lightweight


Integration

with

established

technologies
.

Spring

-

BeanFactory,

Data

Binder

and

Validator
.

Spring

MVC's

DispatcherServlet

and

View
.


Allow

reusablility
.

Can

use

sub
-
flows


Facilitate

test
-
driven

development

(TDD)
.

Flow

executions

are

easy

to

test

both

in

isolation

and

from

the

overall

system

point

of

view


Maintainabiliy


Integrate

Struts,

JSF,

and

Portlet

MVC


Not a Magic Wand!


Choice

should

be

on

the

basis

of

Application

requirements


More

suitable

for

Enterprise

Level

Solutions


Not

a

good

idea

for

just

static

content


Suitable

for

a

stateful,

dynamically

changing,

multipage

navigation

based

solution
.

Whats the reality?

Links


http://www.springframework.org/webflow


http://forum.springframework.org/index.php

(Really useful)


Expert Spring MVC and Web Flow


by Seth Ladd, Darren Davison, Steven Devijver and
Colin Yates


Apress © 2006