cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <g...@tuffmail.com>
Subject Re: [C3] Pipeline component event types
Date Tue, 13 Jan 2009 21:47:44 GMT
Carsten Ziegeler pisze:
>>
> wouldn't work - and maybe this wouldn't even end in an exception. The
> pipeline has no knowledge of the possible event types and which event
> types are compatible. So how can it check the validity of this pipeline?

This is delegated to pipeline componets that has to check if particular way of combining components
is correct. This is
a reason for my feeling of dissatisfaction.

> Hehe...no, no, it's not about the generator, transformer, serializer and
> how to chain them. For instance, the old cocoon pipeline interface made
> sure that you add the components to the pipeline in the correct order
> (first generator, then transformers, finally serializer).
> Just because something has been in one way or the other for years,
> doesn't mean that it's good and can't be made better/easier. :)

You mean hear that old interface didn't made sure?

> Yes, but that's you doing the stuff (or other people involved in
> implementing c3). For new users it is a little bit more complicated.
> Ok, granted, maybe I'm overestimating the benefit of the compile time
> check. Don't know.

Carsten, I don't think that compile time check (or better said just a type safety) can be
overestimated. The problem we
are facing is how to abstract out common bits but still make everything rather general.

>> But so far not working solution/prototype has been made available (or
>> did I simply miss it?).
> :) No of course you didn't miss it. Maybe I have time to look into this
> next week.

Carsten, before you start hacking anything could you have a look at:
http://github.com/gkossakowski/cocoonpipelines2/tree/6c1234a5d439aeced316723d57b9471cbcdeb0e0/src/org/apache/cocoon/pipeline

Which is some kind of solution/prototype, IMHO.

>> And those that have merely scratch surface IMO.
>> There are still things like component order: Generator, Generator,
>> Transformer, Serializer, Generator is clearly not a valid pipeline, even
>> if all components are actually using the same technology.
> Yes, but this can be checked immediately when the component is added to
> the pipeline. Of course, this is not a compile time check.

It can be compile check if you define component's type carefully. Have a look at my discussion
of PipelineComponent
definition in another e-mail.

> Maybe we don't need to change this and just properly naming things (like
> either adding SAX etc. to the class name or as a package) is enough. I
> actually don't know, but I think the easier we make it and the more we
> can check at compile time, the more we attract possible users.

Agreed.

It's not surprising that this subject is discussed warmly. Pipeline API is meant to be essential
part of C3 and we don't
want to change it too often so we need to design it carefully and more importantly, get aware
of advantages and
disadvantages of solution we chose.

-- 
Best regards,
Grzegorz Kossakowski

Mime
View raw message