cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Oliver <res1c...@verizon.net>
Subject Re: Flow wishlist :)
Date Wed, 27 Nov 2002 04:35:53 GMT

Ovidiu Predescu wrote:

>> Flow is designed to simplify the sitemap
>> by reducing the amount of routing components required and by moving
>> business logic out of the sitemap.  Having global flow script variables
>> available to routing components might encouarage users to move the
>> flow/routing control back into the sitemap. Perhaps this is a "best 
>> practice"
>> issue, that we dont have to enforce?
>>
>> Ideally, with business logic moved to the flow controller, one would 
>> only
>> need to use selectors after a generator has been set.
>
>
> The need Marcus originally had was to access the values of the global 
> variables of a flow script in the view layer. The idea is to avoid 
> having to explicitly pass these values in the context object of 
> sendPage*(). Instead one could use something like <jpath:value-of 
> select="variableName" global="true"/>, where 'variableName' is a 
> global variable in the flow scripts.
>
> These variables could be accessible to sitemap components, but they 
> should not be abused. They should only be used during the View 
> generation. They should not be used to do routing, e.g. in selectors 
> and matchers.
>
Um, this sounds extremely bad to me. The use of global variables at all 
should be discouraged in "flowscripts" for the usual reasons. Allowing 
access to them in outside of the context of the script itself sounds 
like an even worse abuse to me. Passing the objects you want to be 
accessible to the view layer explicitly in sendPage*() was a better 
design, in my opinion.

Instead of putting in "convenience" features like this I think it would 
be more valuable to make other view layers (Velocity, JSP's) accessible 
to the flow layer. If someone familiar with the internals of Cocoon 
wants to help me out I'd be interested in contributing to this.

Regards,

Chris


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message