But, if history repeats, it will take a few decades to understand that "FSM for the web are to be considered harmful". So I don't expect everybody to buy it right now. I'm patient :-)
Okay, maybe I'm wrong, but maybe not.
But if I understand you correct, you try to prevent different solutions, which try to adopt some ideas of the continuation concept.
You are not prevented from writing FSMs using flowscripts. As no common program languages (that I have seen at least) has any support for writing FSMs, people have developed a number of design patterns for coding FSMs in different programming languages. I would guess that a majority of the worlds FSMs are written using a two layer switch.
In flowscript you could write something like the following to implement the FSM for the feedbackWizard example (the example is simplified as it doesn't take care of the form parameters, and the code is untested):
function feedbackWizardFSM() {
var state = "start";
while ( state != "end" ) {
sendPageAndWait( state + "html" );
event = request.operation;
switch ( state ) {
case "userid" :
switch ( event ) {
case "next" :
state = "deplyment";
break;
}
case "deployment" :
switch ( event ) {
case "next" :
state = "system";
break;
case "prev" :
state = "userid";
break;
}
case "system" :
switch ( event ) {
case "next" :
state = "confirm";
break;
case "prev" :
state = "deplyment";
break;
}
case "confirm" :
switch ( event ) {
case "next" :
state = "system";
break;
case "prev" :
state = "end";
break;
}
}
}
sendPage( "end.html" );
}The above could of course be abstracted in various ways for better code reuse or you could write a FSM interpreter in Java that use an XML description of an FSM and call it from a flowscript or from an action.
/Daniel
