Spring Web Flow is a framework that introduces the concept of flows to extend the navigation capabilities of the Spring MVC framework. It allows expressing navigation rules and managing conversational state through the use of flow definitions composed of states and transitions. This provides advantages over traditional approaches like JSP, Struts, and JSF by making the navigation logic more modular, reusable, and visually understandable through tools like the Spring Tools Suite flow editor. While it adds capabilities, it also introduces some performance overhead and complexity that may not be suitable for all applications.
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Spring Web flow. A little flow of happiness
1. Spring Web Flow:
A little flow of happiness.
Сергей Моренец, morenets@mail.ru
24 мая 2013 г.
2. About author
• Works in IT since 2000
• 9 year of Java SE/EE experience
• 5 years of Spring (including SWF) usage
• Regular speaker on Java User Group conferences
• Senior Java developer in Provectus
3. Agenda
• Overview of the navigation history
• Basics of SWF
• Practical usage
• Pros & Contras
• Q & A
11. Disadvantages
• Visualizing the flow is very difficult
• Mixed navigation and view
• Overall navigation rules complexity
• All-in-one navigation storage
• Lack of state control/navigation customization
12. What is Spring Web Flow?
• Developed by Erwin Vervaet in 2004
• Initial version released in October, 2006
• Spring MVC extension
• Introduces flows concept
• Extends application scopes
• SWF 2.3.2 released in Jan, 2013
13. Erwin Vervaet
• Belgium citizen
• Holds master's degree in computer science
• Originator of Spring Web Flow Project
• Senior project manager together with Keith Donald
• Speaker on the most Java and Spring related
themes
• Independent consultant www.ervacon.com
14. What is SWF for?
• How do you express page navigation rules?
• How do you manage navigation and conversational
state?
• How do you facilitate modularization and reuse?
18. Flow definition
• XML document with predefined elements
• Flow definition is composed of a set of states
• Each state has one or more transitions that are used to
move to another state
• A transition is triggered by an event
51. Breadcrumbs
• Navigation elements in UI
• Allows to keep track of the documents within
system
• Provide links to move to current, previous or next
step
• Home page > Section page > Subsection page
58. Future
• Suspend/resume functionality
• Backtracking support
• Flows deployment as OSGi bundles
• Native support for Tiles and FreeMarker
• URL rewriting
• Java-based flow definition syntax
59. Pros
• High-level navigation control with clear observable
lifecycle
• Designed to be self contained
• Compile-independent
• Easy to understand and visualize
• Expression language support
• Custom validation (including AJAX)
• Integrates with major web frameworks
60. Cons
• Requires Spring framework
• Separate Spring project
• Additional performance overhead
• Lack of community support
• Not suitable for simple or flow-free applications
61. Spring Tools Suite
• Eclipse development environment for building
Spring-powered enterprise applications
• Visualization of Spring Web Flow
• Flow graph
• Flow editor