[Zope-PTK] Refactoring PTK, Redux

Dan L. Pierson dan@sol.control.com
Tue, 13 Jun 2000 16:45:13 -0400 (EDT)


Tres Seaver writes:
 > Not necessarily -- if you create your own Python product, you can certainly
 > add Discussable to the content classes (base/concrete) it registers.  I
 > merely want to avoid dictating that all portals *must* have the "stock"
 > NewsItem/Document/File/Link/Image types available (which is forced by the
 > current packaging).

I agree with this goal.  It's probably good that Python products can
be Discussable PortalContent, but I actually think its a good idea for 
the standard types to be ZClasses since those seem to be understood by 
more content managers.

Now that I think about this, DiscussionItem.py should also be moved to 
PTKDemo and a ZClass created for it.  This is what you need to modify
if you want to change the way replies are presented for different items.

 > > Given the above, it sounds good.  I'm still hoping that it will be
 > > possible for a content manager to change the appearance of a type of
 > > PortalContent without editing the ZClass itself.  Otherwise sites that 
 > > host multiple portals can expect problems (BTW: this probably isn't us).
 > 
 > This goal is actually a Hard Problem (TM).  I don't see a general solution
 > for this;  a given site could require that each PortalContent class
 > in the portal is designed to pick up its skin via acquisition, and perhaps
 > supply a default skin to be used as a fallback.

Sounds like the best solution be may be to have a few Python content
base classes and subclass the standard content ZClasses from these in
simple, documented ways.  Then people who really have this problem can
just create multiple "synonymous" content ZClasses with the same
functionality but different look, feel and id.