Chapter 5. Enhancing Spring MVC applications with Web Flow
This chapter covers
- An introduction to Spring Web Flow
- Building a Spring soccer demo application
- Using action classes
- Working with form data-binding and validation
- Understanding flow and state inheritance
- Securing web flows
Most enterprise Java developers have worked on web applications that have some sort of workflow component to them. Classic use cases consist of searching for products, booking a flight, and preparing your tax return. But without the right tools, determining how to manage this workflow can be a challenge.
Model-view-controller (MVC) frameworks work best in situations where the unit of work required to create or update the model can be implemented in a minimal number of views. By itself, though, the MVC pattern doesn’t provide an efficient mechanism for managing a series of intermediate steps, their rules, and states that span multiple requests. As a result, page-flow logic typically seeps into both the view and controller tiers whereas the application state required to support the page-flow logic is often spread between a combination of session and request parameters. As a result, understanding, maintaining, and testing complex page flows in an MVC application can quickly become an arduous task.