Architecture Overview
Easy Wizard has modular architecture and consists of two major parts: Rule Engine and Wizard Manager.
Rule Engine
Rule Engine is the core component, which does not depend on a particular presentation framework. Rule Engine is customized for each particular flow. It contains
steps, transitions between them, and one Wizard Controller object, which interacts with Wizard Manager.
Wizard Manager
Wizard Manager is the component, which adapts Rule Engine to a particular web framework. Easy Wizard provides a custom Wizard Manager class for every
framework it is compatible with.
The task of Wizard Manager is to accept input from a user and to render wizard pages. Wizard Manager must obey certain rules,
despite underlying framework.
Integration with Web Framework
This diagram shows Easy Wizard interacting with domain model and with different web frameworks.
Input data and wizard command are submitted from HTML FORM. Struts, JSF or other web framework
performs initial processing of input data and command. Then, web framework dispatches client event to
the Wizard Manager.
The Wizard Manager functionality is provided by a separate class to ensure higher level of abstraction
from a web framework. This functionality can be as well implemented by Struts action/form classes or
by JSF backing bean.
Wizard Manager handles request/response operations, it accepts user input, dispatches input data to
the Rule Engine, receives back error messages and displays page appropriate to current wizard state.
Wizard Manager is also responsible for proper handing of Back/Forward/Refresh buttons.
Rule Engine contains definitions of wizard steps and transitions, and integrates with domain model.
It does not depend on UI modules or web frameworks, and can be tested in headless mode, using standard
JDK only.
If Forward transition was requested, Wizard Controller validates outgoing transitions for
current step, and chooses a valid one. Wizard Controller changes the state of Rule Engine and returns
back error messages if any.
Wizard Manager chooses the proper page to display according to current state of Rule Engine.
Web framework redirects to the proper page, and displays it along with error messages that were
generated by Rule Engine.
|