cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Pötz <reinhard_po...@gmx.net>
Subject RE: [Vote] Controller/Sitemap integration
Date Thu, 17 Jul 2003 14:23:24 GMT

From: Stephan Michels 
 
> On Thu, 17 Jul 2003, Geoff Howard wrote:
> 
> > Stephan Michels wrote:
> >
> > >>      - rename "WebContinuation" to "FlowState", and accordingly
> > >>        "WebContinuationManager" to "FlowStateManager".
> > >
> > > Yes, the Continuation represents a state, but to make a clear 
> > > difference as a new concept, I think 'Continuation' is 
> accurate. But 
> > > 'Web..'?!
> > >
> > > - rename "WebContinuation" to "Continuation", and accordingly
> > >          "WebContinuationManager" to "ContinuationManager".
> >
> > I guess I'm a little confused at the general agreement on 
> this naming 
> > using "continuation".  I thought I was hearing in Sylvain's 
> original 
> > RT that continuations may not be the only implementation.  I don't 
> > have a problem with any of the new names suggested which is why I'm 
> > not really adding anything to the discussion at this point, but I 
> > don't want to have the discussion miss this point.
> >
> > Could someone who resonates with the vision for these other 
> potential 
> > (non javascript-with-continuations) implementations of flow 
> comment on 
> > this quickly?  If it satisfies you, I have no personal objection.
> 
> A little example:
> 
> function myFunc()
> {
>  x = "bla";
> 
>  sendPageAndWait("first")
> 
>  if (answer = sucess)
> 
>    y = "blub";
>    sendPageAndWait("choice")
> 
>  else
> 
>    y = "yagh";
>    sendPageAndWait("choice")
> 
>   sendPageAndWait("last")
> }
> 
> Here you have four different states:
> 
> state 0:
>   x = "bla";
>   sendPage("first")
> 
> state 1:
>   y = "blub";
>   sendPage("choice")
> 
> state 2:
>   y = "yagh";
>   sendPage("choice")
> 
> state 3:
>   sendPage("last")
> 
> And several transitions:
> 
> state 0 -> state 1 if answer = sucess
> state 0 -> state 2 otherwise
> state 1 -> state 3
> state 2 -> state 3
> 
> So, here we have a DFA.
> 
> The 'continuation' means to freeze the current state of the 
> execution. The benefit of the continuations are that you have 
> a history of the states, which you had traversed. And like a 
> backtracking algorithm, you can go back to a previous state 
> and follow another route.
> 
> So, the answer is, it is sufficient to have the 'history of 
> states' to take a new name like 'continuation' instead of 
> simple 'state'? I think yes.

Sorry, I don't think so. I'm not a specialist in Scheme but I think
there is a concept behind continuations and the general use for all
controllers in Cocoon would be misleading.

Reinhard


Mime
View raw message