[Zope] Zope design: the liberal use of subclassing?
Darran Edmundson
dee124@rsphy1.anu.edu.au
Tue, 18 Jan 2000 17:16:49 +1100 (EST)
One component of our budding academic site is a
searchable database of publications authored by
department members. Publications come in various
flavours: journal articles, conference proceedings,
books, book chapters, etc. All of these share
certain properties while others are unique.
Question: In terms of ZClasses, is it best to create
an abstract Publication ZClass with common data
and methods and then subclass the various flavours?
In addition to publication details, I also want
the option of encapsulating the data files, be it in
PDF, MSWord, ASCII, TeX format, etc.
Question: Rather than create a slew of File-like
products in the root Product folder, should I again
create an abstract class and subclass for each
Mime type a la the PDF example used in:
http://www.zope.org/Members/lstaffor/zProperties
The same applies for People, variants of which
include staff, students, alumni, visitors, etc.,
with the difference that people can migrate from one
class to another (student to alumni).
Summary Question: Generally speaking, rather than
create a slew of ZClasses in the root Product folder,
should one liberally subclass?
Advice on these critical design decisions is most
appreciated.
Darran.