cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <>
Subject Re:
Date Wed, 24 May 2000 06:42:09 GMT
Jonathan Stimmel wrote:

>   I don't understand the need to both create an interface and an
>   abstract class that implements the interface. I would expect that
>   one or the other should suffice (I would tend towards an abstract
>   class), and trying to use both just increases complexity (and
>   maintenance overheatrying to use both just increases complexity
>   and maintenance overhead. (This is not the only place this is done)

Abstract classes should not be used instead of interfaces. They should be
helpers to the subclasses. If you only have a single subclass, that structure
looks a bit weird.

The point is, the Abstract class is not necessary, only the interface. All
declarations in the program only knows about the interface, and you are free
to start from scratch or have a class implementing many interfaces, which is
not possible with inheritence.

Also, DirectoryGenerator could possibly add a MimeType element, so that icon
based viewing could be allowed. Would be cute.

I will try it out straight away.

View raw message