Appendix 1 - Process Flow
The following chart compares the flow of actions in a Swing application with the flow in a JSF web application.
Swing JSF
Activate Application Call Java against Client makes a request to
main() method a web server to URL's
in an app class. identified as JSF pages.
Authentication JAAS Login Container Filter / Login
Authorization JAAS - homegrown Container Roles / homegrown
Fill a backing bean Controller Logic Controller Logic
with current data
Instantiate UI View Code written JSP Code using JSF
Components by developer components - written by
developer. Layout done
by a Web Designer.
Fill UI Components Hibernate or home- Done automatically by JSF
with bean data grown code based on bindings
Display View Activate JFrame Render a View and send
to a client
Listeners are Listeners attached to Buttons and hyperlinks
activated buttons and some become available. When
components activate pressed they submit the
form and listeners take
over.
User edits data User enters data User enters data -
Jakarta Commons
on screen syntax formatted text fields and Struts JavaScript can
checked occurs and pop-up do some on-screen syntax
components help checking
insure value syntax
Event Happens Additional validation and Form is submitted.
error checking occurs - Web server figures out
whose session this is
- Tree is built
- Data from request fills
in the tree. Conversion
happens.
- Validation happens
- Beans are filled
- Method attached to
Event activates.
Errors might JOptionPane messages - Conversion errors OR
happen inform the user and the - Validation errors OR
page waits for corrections - Errors filling Bean OR
and a new event - Errors found in Method
queue messages and
the page is rendered
(with the messages)
and system waits for a
new request.
Data is moved from Developer code Done automatically
UI components to as part of life cycle
the bean
Action is started by Developer code Started as part of
listeners life cycle. The
methods are
developer code
Decision on next page Developer code Return from method is
is made used to look up the
next page.
-