cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Washeim" <>
Subject Re: XSP and Cocoon2 Generators
Date Tue, 04 Apr 2000 22:23:31 GMT

>Donald Ball wrote:
>> On Tue, 4 Apr 2000, Ben Laurie wrote:
>> > Stefano Mazzocchi wrote:
>> > > But my best argument to compile an XSP page into a generator instead
>> > > a filter is runtime performance: a generator spits events directly,
>> > > while a filter interprets events generated by something else.
>> >
>> > Then a generator is just a degenerate filter. You feed it <go/> and it
>> > spits its events.
>> Ha! Everyone loves a smart aleck. :) Good point though.
>Of course. I draw the design patterns one again:
> - producer
> - consumer
> - generator = producer
> - filter = producer + consumer
> - serializer = consumer

What keeps being overlooked is that (and I've mentioned it before) you can
represent a filter with the decorator patter (also known as wrapper, aka the
unix pipe, sort of).

Gamma, et al, have a nice example of the decorator pattern applied to file
filerting in much the way you envision.

in our context 'work around' the deficient 'servlet chaining idea' with a
decorator pattern based 'action wrappers' framework.

in the cocoon context,

new filterOne( filterTwo ( filterThree ( this.generator ) ) )

is entirely concievable. It's too late for me to elaborate now (I'm asleep),
but I'll submit something in more detail tomorrow night.

>what "degenerate filter" means is that "filter extends producer" and
>you're totally right.
>Small point, I concur, but we should try to separate the design patterns
>as much as we can and enforce them with java interfaces whenever
>Using something as "degenerate something-else" is not good practice,
>Even if I agree that from a development point of view it may not change
>Stefano Mazzocchi      One must still have chaos in oneself to be
>                          able to give birth to a dancing star.
><>                             Friedrich Nietzsche
> Missed us in Orlando? Make it up with ApacheCON Europe in London!
>------------------------- http://ApacheCon.Com ---------------------

View raw message