Spring WebFlow is Easier With Grails (Ken Rimple)
Groovy Grails, SpringSource April 11th, 2008
He begins:
Everyone has had to code an application at some point where they were forced into a particular set of navigational flows. There are a few ui-centric workflow packages out there, including Open Symphony’s OSWorkflow, and Spring’s WebFlow. Other developers at my shop have worked with WebFlow and were pleased with its features. But did you know that Grails embeds WebFlow and makes it available within its controllers automatically?
He covers the basics of WebFlow:
For a thorough introduction to Spring Webflow, I suggest visiting the SpringSource site. However, in general, webflows can be broken up into distinct components:
- State - This is a ‘definable moment’ within the webflow, such as a View State, where the application is waiting on user input.
- Transition - An event, often fired by a user taking an action, that moves the webflow from one state to another.
- Action - Code that can be performed within a transition, or on the start or ending of a given State
- View - A (GSP) page that is rendered during a ‘view state’.
- Flow Scope - A semi-session-like container that lives for the life of the webflow. Data captured from one view to the next
He concludes:
Without too much more ceremony, I can simply say that although Spring WebFlows are a great feature, and take a lot of pain out of implementing flow-based application logic, they are made even easier by Grails.
For more Flow goodness, check out the grails documentation page on it.
Tags: Groovy Grails, SpringSource
About
Leave a Comment
You must be logged in to post a comment.