views:

294

answers:

2

I like the idea of Spring WebFlow - particularly the way the flow definitiion abstracts the higher level web flow from components in the Spring Bean Container.

The Flow definition format seems to include everything one needs in a Web Flow - views, actions, transitions, subflows, outcomes etc.

Do you think the Spring WebFlow Flow Definition format would be suitable for externalising a Web Flow for a non Spring framework? Something that does not use Spring, or perhaps even Java, for its underlying components.

Bear in mind, I am thinking of only page flow in particular, not general workflow or BPEL type stuff

+1  A: 

State machines (like spring webflow) have been used to describe web-app flows since the first web-apps were built. So yes it's ok. Why isn't everybody doing it ? I think that when using state machines to describe web-flows there is a tendency for formalism to take a little bit too much over. What starts off as a good idea ends up being more of a pain. Ajax and multiple concurrent active states on a given page makes it even worse.

krosenvold
A: 

The biggest strength of the SWF in my opinion is that centralizes flow (navigation) in a single place and makes it explicit, easy to read, manipulate etc. It is well suited for more complex navigation flows where you might go back and forth between pages, or for wizard-like or step-by-step UIs. It also has some advanced reuse features like subflows and flow inheritance.

The concept of view state and action state well mimics user - web app interaction where transition to action occurs after user has created an event, then the next view is presented to a user and the machine is in a state waiting for next user event. It is important to note that these flows occur on server side. Everythnig seems to be moving to a client side these days and even so state machine can have its role. Flex for example has a concept of states and transitions. These should help programmer manage complex UIs with lots of controls. States can hide or display controls and much more. So, I’d say this can be a very neat paradigm for modeling flows and user interactions.

Dan