cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
Subject Re: [Flow] Scope and Sessions
Date Wed, 18 Jun 2003 07:42:50 GMT
Geissel, Adrian wrote:

>Just a thought:
>
>  
>
>>>>From a technical point of view, are there any other possiblities 
>>>of implementing the JavaScript global scope. 
>>>      
>>>
>>I assume this is a question. The request is obviously not good at this
>>and the servlet context is way too broad. Any other mechanism 
>>would be a
>>data container associated in some way to the state of the webapp
>>execution and this is exactly what a session is.
>>
>>    
>>
>
>Pier described a very good use-case which applies to pretty much every
>real-world web application - that basically it is understood to re-entrant.
>>From my experience, storing state in the session has two issues - first is
>the 'forked UI syndrome' described, and the second is that resources
>associated with the state are held indefinitely, especially if the user
>decides not to complete the operation, as is their choice.
>
>My solution in the past has been to manage state / flow in the response (ie.
>that sent back to the user), but obviously this is what Flow is trying to
>improve. 
>
>So, my thought is this - can the flow state be included in the response for
>re-submission later. For example, a flow-invoked HTML serializer could
>insert hidden input fields to maintain state, or similar? 
>  
>

Mmmh... don't take it as an offense, but I think you missed what is 
brought by continuations.

The global context, attached to the session, should be used to store 
values that don't depend on the current interaction flow. These will be 
mainly the user credentials, and any singleton values attached to the 
user (can be a shopping cart for example).

Transient state, describing the current interaction with the user, 
should be held by local variables in the flow function that drives this 
interaction. This means that they're attached not to the session, but to 
the continuation, and therefore can have different values if the UI is 
forked.

So the flow state is transmitted through a single value, the 
continuation identifier, which can be either in a hidden field or in the 
submit URI.

Hope this helps.

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



Mime
View raw message