cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guido Casper" <gcas...@s-und-n.de>
Subject Re: InspectableSource
Date Mon, 27 Oct 2003 18:40:58 GMT
Unico Hommes <Unico@hippo.nl> wrote:
> I am looking into extending SourcePropsWritingTransformer to also be
> able to remove SourceProperties. One thing I need to decide is how to
> access SourceProperties now that we have SourceDescriptor interface.
> From SourceDescriptionGenerator I can see that the distinction between
> SourceInspector and InspectableSource was mainly that of computed vs.
> modifiable. With the new SourceDescriptor interface this distinction
> does not exist anymore and so we have in fact two interfaces with the
> same functiality. We need to decide what to do with that.
>
> I see three possibilities:
>
> 1) keep InspectableSource interface. SourceProperty related sitemap
> components talk with both interfaces to do their job, favoring
> InspectableSource if the Source implements it else falling back on
> SourceDescriptor.
>
> Pro: - SourceProperty related coding can be done directly onto the
> Source.
> Con: - Confusing what properties are managed where
>      - Clients have two interfaces to choose from
>
> 2) deprecate InspectableSource in favor of SourceDescriptor and
> migrate SourceProperty related sitemap components to use the
> SourceDescriptor interface instead, taking care for backwards
> compatibility with Sources that haven't moved away from
> SourceInspector yet.
>
> Pro: - Client need to use only one interface
> Con: - Need to refactor some things
>      - SourceProperties are not directly available on Source.
>
> 3) make SoureProperty related sitemap components talk directly to
> InspectableSources only. Create a Source delegate - callit
> RepositorySource - that adds inspectability to arbitrary sources by
> talking to SourceDescriptors.
>
> Pro: - One interface
>      - SourceProperties directly visible on Source
>
> Ok, I think I just answered my own question ;-D, but I'd be interested
> in others' opinions.
>
> What do others think?

+1 for 3)

Guido


Mime
View raw message