cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <vadim.gritse...@verizon.net>
Subject Re: cvs commit: cocoon-2.1/src/scratchpad/src/org/apache/cocoon/generation TraversableGenerator.java
Date Thu, 10 Jul 2003 18:54:49 GMT
Geoff Howard wrote:

> Vadim Gritsenko wrote:
>
>> Sylvain Wallez wrote:
>> ...
>>
>>> IMO, the name should reflect the notion of Source and either 
>>> traversal or hierarchy. So what about SourceHierarchyGenerator 
>>> (that's the name of my implementation) or SourceTraversalGenerator ?
>>
>>
>> I would prefer something really simple; like 
>> SourceDirectoryGenerator. Or DirectoryGenerator... Too bad it's 
>> already taken. Can ALL of those implementations (including XPath and 
>> RegExp/Wildcard (for wildcard existing matcher code should be 
>> reused)) be merged into one code base, of the DirectoryGenerator 
>> (does it make sense?)?
>
>
> That's kind of what I was envisioning originally - if the code is
> merged (and it seems good to do so) 80% of the users will use it
> for file system directories, and naming it anything too different from
> "DirectoryGenerator" will obfuscate it's function.  But some of the
> proposed TraversableSources don't fit with "Directory" at all (at least
> XMLDB doesn't), so I thought "hierarchy" type names a good compromise. 


CollectionGenerator -- somebody already suggested this name, right?


> Wild proposal: merge all code into one class, named something very
> clear (like TraversableSourceHierarchyGenerator) and subclass that
> with DirectoryGenerator (or something very like it) and have that
> subclass override nothing:
>
> public class DirectoryGenerator extends 
> TraversableSourceHierarchyGenerator {
>
> /**
>  * Identical to superclass - class only for name/function clarity.
>  **/
>
> }
>
> too crazy?


No :)
That is usual practice to support backward compatibility.

Vadim



Mime
View raw message