Re: ResourceFilePublisher

"Andreas Hartmann" <[email protected]> Wed, 19 Mar 2003 16:25:32 +0100 (CET)
Newsgroups gmane.comp.cms.wyona.devel
Message-ID <[email protected]>
Hi Christian,

sounds good, but just a remark:

> * ResourceFilePublisher is a sublclass of DefaultFilePublisher which
>   also publishes resources

How do you think about not deriving from DefaultFilePublisher but create an
independent class ResourcePublisher? That would allow to combine a
"specialized" Publisher with the ResourcePublisher:

   <task id="publish">
     <label>Publish</label>
     <task id="publish" class="org.lenya.cms.publishing.MyFilePublisher"/>
     <task id="publish-resources"
class="org.lenya.cms.publishing.ResourcePublisher"/>
     <task id="export" class="org.lenya.cms.publishing.StaticHTMLExporter"/>
   </task>

I don't know if this is useful here, but otherwise:
always prefer delegation to inheritance :)

Andreas