Page flow proposal


Added by sdevijver, last edited by sdevijver on Dec 28, 2006  (view change)

Labels

 
(None)
Work in progress

This proposal is a work in progress. At this point it may not be complete and has not be reviewed or approved.

Page flow proposal

Introduction

This is a proposal to add page flows to Grails, again. Currently there is a page flow implementation for Grails but it has been maintained for more than one year. It's also based on an old version of the Spring Web Flow (SWF) API (1.0 PR5) and would require a lot of work to become compatible with the current version of the API (1.0).

This proposal suggests a new syntax, semantics and implementation for page flows in Grails. Over the course of one year we have learned how to be more expressive in Grails. This proposal is the second iteration of page flow in Grails based on the current state of affairs in Grails.

Reviews requested

Members of the Grails community are invited to share their thoughts on this proposal, either as comments on this wiki or on the mailing list. Please do not modify this article unless you are a maintainer.

Goals

Below are the goals for a new page flow implementation:

  • DRY: the configuration shouldn't contain any duplicate information. Also, code and configuration should be in one place.
  • Easy to create real world page flows: page flow classes should be easy to read and modify for real world page flows. It should be discouraged to create very long page flows in one class.
  • Subflow support is critical for real world page flows. It should be extremely easy to call page flows, pass parameters and get return values.
  • It must be possible to convert page flow classes to a dotted graph representation.
  • It must be possible to show a page flow in the browser and highlight the current position. This should only be possible in development mode.
  • There must be easy to understand error pages.

Requirements

  • The implementation is based on Spring Web Flow. There is little point in trying to be universally compatible with any page flow framework. First of all, there aren't that many other. Secondly, none is a simple and flexible as Spring Web Flow.
  • Code in Spring Web Flow should be reused and extended but not rewritten.

Syntax and semantics

Page flow class

This an example of a page flow class:

Page flow class example
class PortalHomePageFlow {
}

Conclusion