On Tuesday, July 15, 2003, at 02:19 PM, Vadim Gritsenko wrote:


Christopher Oliver wrote:

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.

<snip/>


Back to Antonio's suggestion. Can we have a configuration of the flow controller specifying where to store those global variables? Context, session, and request (that should be analogue to "no session", right?) can be possible values.

I am using global variables in two situations ....


1. Static Variables

stuff like could easily be in the Application or Request Context:

            var Beans = {
              COVERAGE  : "org.iniva.archive.Coverage",
              PERSON            : "org.iniva.archive.Person",
              PROJECT           : "org.iniva.archive.Project",
              RESOURCE  : "org.iniva.archive.Resource",
              TYPE                      : "org.iniva.archive.Type",
              URL                       : "org.iniva.archive.Url",
              USER                      : "org.iniva.archive.User"
            }
        
2. The User's login details

this could have been handled by an authentication Action in the SiteMap, or even in the Container.

While I do actually use Continuations in some functions, I strenuously avoid keeping any other 'app state' in Global variables, so that the user can have multiple browser windows open with different independent tasks in progress in each one.

If there are going to be ways of externally configuring how Global Variables are stored, I think we need to take into account a possible need to store different variable sets in different ways.

I do not believe that a global setting in Cocoon.xconf would be a good idea though, I will have multiple FlowApps in one Cocoon Instance, they by no means would want to share the same settings.

regards Jeremy



Reply via email to