cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dev at weitling <>
Subject Re: RT: map:call as generic non-redirecting controller code
Date Fri, 06 Jul 2007 12:05:01 GMT

Grzegorz Kossakowski wrote:
> Dev at weitling pisze:
>> I'm not against processing data, I want to avoid introducing a new
>> protocol. 
> I think that we already have such a protocol, are you aware of
> xmodule:flow-attr combo?

Not, but it looks interesting. Will have a look on it.

>> And functions returning values the classical way (return
>> myBestStuff;) will reduce readability of the pipeline. For few and/or
>> small values I'd prefer variables, for many and/or big values one should
>> think about introduce a generator or transformer weaving the data
>> directly into the pipeline.
> By variables do you mean something like {someVar} construct in sitemap
> and someVar can only contain string value?

Ok, you caught me red-handed. I still don't dream at night of the
various variable types in Cocoon. I meant a kind of business variable
cntaining Java objects.

>> Giving even void functions a sense: Doing something when a certain point
>> in a pipeline is reached not directly touching data flowing through the
>> pipe.
> That's what I would be against to. Side effects is the last thing we
> need in pipelines, IMHO. Personally I would like to see possibility to
> call function only at the *beginning* of the pipeline and *before*
> data is even processed. Exactly the same way actions are called today.
> The point about implementing generator is valid only if you want to
> implement something generic enough to call it component (generators
> are components). Implementing use-it-once components is anti-pattern,

Yes, of course, implementing a use-it-once component is anti-pattern.
What about this:

<map:call function="sayHelloToAuntBerta"/>
<map:generate type="kissPrepare"/>
<map:call function="sayNooooo"/>
<map:transform type="kissApply"/>
<map:serialize type="chubbyFacePincher"/>
<map:call function="makeNoteNeverToTantalizeLittleChildrenWhenGrownUp"/>

... where the functions just print something to a file, let the computer
make weird noises, whatever, but NOT process those big humid kisses...
The concept of pipelines is creating sax event, modifying and
serializing sax events. Extensive use of functions injecting data would
open a new parallel kind of pipeline.

As Ellis Pritchard pointed out in his first post: It's about control
flow not processing data.

BTW: Will Actions be replaced by something more readable in future or
did I miss the discussion about?


View raw message