cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: DirectoryGenerator using abstract Source
Date Thu, 14 Jul 2005 22:45:36 GMT
On 14.07.2005 10:59, Gianugo Rabellino wrote:

> Don't want to rain on the party, but this has been exactly the kind of
> discussion that led nowhere a couple years ago.

Sorry for that ...

> I'm now convinced that
> File/DirectoryGenerator are there to stay, there is just too much
> stuff depending on it. Apart from naming issues (beware the bikeshed
> effect), my take would be:
> 
> 1. move TraversableGenerator to src/core,

+1

> deprecate DirectoryGenerator leaving it untouched

Read below.

> 2. insert some log.xxx("DG is now deprecated, please use TG instead"),
> where "xxx" is promoted from debug to error in a few release cycles
> 
> 3. optionally start introducing XMLGenerator the same way (though the
> only path I can foresee is via c&p)
> 
> In any case, avoid "extends" like the plague. If anything, the hassle
> we're going to have because of that bunch of generators extending DG
> should prove how extends can be harmful. Actually, it might be worth
> thinking about refactoring the whole stuff using composition.

Yeah, I know: "prefer composition over inheritance". And it might 
improve the DGs we have. But when we make DG extending TG just for a 
naming issue I see no advantage in composition and adding so many 
delegating methods.

And why do you want to leave DG untouched at all? Couldn't TG do the same?

Regarding 3.: +1 for doing it the same way - what ever we will decide.

Joerg

Mime
View raw message