cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Pötz <reinh...@apache.org>
Subject Re: [C3] Pipeline component event types
Date Tue, 13 Jan 2009 18:40:17 GMT
Carsten Ziegeler wrote:
> 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.

The situation is similar to Spring which allows the wiring of components
that don't fit together. As long as I get proper error messages I don't
really have a problem with it.

It might help to introduce a PipelineComponent type:

public interface PipelineComponent<T extends PipelineContentType> {
   ...
}

but also adds to the verbosity of the code. Hmmm.

> 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?

Currently we have 3 different pipeline implementations (noncaching,
caching, async-caching). Your approach would multiply these three
implementations with the content specific implementations that we would
have to maintain separately. This doesn't sound like a promising approach.

-- 
Reinhard Pötz                           Managing Director, {Indoqa} GmbH
                         http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member                  reinhard@apache.org
________________________________________________________________________

Mime
View raw message