Continuations do not require the session. But the session is needed to support cases where you use JS global variables to share data between multiple top level page flows. In your cases, there are no shared variables or else there is only a single page flow. I guess Stefano and Ricardo are arguing that in almost any real application that would not be the case. In Ovidiu's original design you had to explicitly request use of the session in your script. Perhaps we should just turn that around and require you to explicitly request to _not_ use the session:

    function mySessionLessFlow() {
           cocoon.useSession = false;
           sendPageAndWait("blah.xml");
    }

What do you think?

Regards,

Chris

Geoff Howard wrote:

Upayavira wrote:

I personally think that sessions should always be available from the flow, because I never felt the need to use flow without keeping some form of state but you seem to imply that your experience is different.

Can you show us how?



I have a simple site where I'm using flow (for the first time). It is a
single page site, with a form that the user can submit to change the info
presented on the page. The page uses SendPage(), and doesn't use
continuations, as all of the 'global' data is passed back and forward via
a form on the page itself. So no global variables are needed.
As no global variables are needed, no session is needed.


It's a pretty trivial example, but to my mind it is a site that uses flow
but doesn't need sessions. Or am I doing something wrong ;-)


Regards, Upayavira


I don't think I can add much to that - the trivial examples are the important ones in this case. The actual script I was working on at the time is the one in the eventcache block (which by the way is a confusing name - it's about uncaching with events). I posted it in this thread, but stripping it to the bones, it's just:

function func() {
  doSomeThing();
  sendPage(uri); _or_ redirectTo(uri)
}

No continuations in a perfect world should mean no session. Don't know nearly enough about the FOM implementation that Chris did (but I think it involves vodoo somewhere ;) ) to suggest whether that's technically feasible.

Geoff






Reply via email to