cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Dolg <steven.d...@indoqa.com>
Subject Re: [C3] Pipeline component event types
Date Tue, 13 Jan 2009 18:39:13 GMT
Carsten Ziegeler schrieb:
> Reinhard Pötz write:
>   
>>>> Agreed. How do you know what kind of wrapper do you need if you don't
>>>> know what kind of events components consume and produce?
>>>>         
>> My assumption is that the developer that uses the pipeline knows what he
>> does.
>>     
> :) While this assumption *should* be true, we all know that in most
> cases it is not. So I fear many people will stumble across this problem.
>
> But I have one question: if we don't allow to mix different event types
> in a single pipeline (and I guess by event types we mean sax, dom, stax)
> why do we have a generic pipeline interface?
>
> Wouldn't it be better/easier to have a sax pipeline, a dom pipeline, a
> stax pipeline, perhaps sharing a common interface?
>   
 From my point of view:
Currently the user must know which components he needs (as in "I want to 
process XML and I'd like to do it with StAX").
As soon as he know this, he just selects the components (either existing 
or created) but them in *any* pipeline (caching/noncaching/etc.)
Done!
If he feels that he needs that little extra performance and can handle 
it in SAX as well: just change the components - Done!


If there were multiple, content-specific Pipelines he still needs to 
know which components, but also which type of Pipeline.
If he feels the need to change to SAX (so a switch in the "event type" - 
IMO a sub-optimal term, since not every component actually passes nice 
events like StAX does) he also needs to change the Pipeline.
This may seem easy now, but imagine a larger system. Changing the 
pipeline type can be challenging there.

And what about automatically generated pipelines (e.g. the sitemap).
This will be so much harder as you have to collect and analyze all 
components first before you can actually build the pipeline to use.


Defining a common interface for different pipeline types does not really 
change this.
If the common interface is sufficient for handling and operating the 
pipeline they are exchangable (from the callers point of view) and 
provide the same environment we have now.
If the common interface is not sufficient for handling and operating the 
pipeline it is merely a marker interface and it probably wouldn't make 
much difference. (Although it is still useful for declaring parameter 
types, etc.)


I may be biased here ;-) but I have yet to see the benefits of different 
pipeline types...

Steven
> Carsten
>
>   


Mime
View raw message