[Zope-PTK] Refactoring Discussable

Tres Seaver tseaver@digicool.com
Wed, 26 Jul 2000 16:45:40 -0400 (EDT)

During some stress testing last week, Jim Fulton and I noticed
several performance issues with the PTK, and in particular with
the Discussable base class.  In addition to checking in the
changes we made to address these problems, I'd like to propose
that we remove Discussable as a base class of PortalContent.  The
rationale for this change is as follwos:

 * Discussable is already registered as a base for ZClasses, so
   and PortalContent developer who wants to make their content
   class discussable can.

 * There is a non-trivial cost with building the toolbar for
   Discussable content objects -- the current implementation
   has to do a catalog search for replies to the current
   content object in order to generate correct toolbar items.

 * While many content types *are* naturally "discussable",
   forcing every content type to be discussable is unhelpful.

In addition to removing Discussable as a base for PortalContent,
this proposal includes adding it back into NewsItem, Link,
Document, File, and Image (to preserve their existing behavior).

The downside of this refactoring is that any PortalContent
derivatives developed by PTK users will either lose their
"discussability" or else need to be modified to add it back.

A separate proposal would address some of the above-labored
issues by storing all DiscussionItems within their "host"
Discussable object, removing the need for the catalog query.
This second proposal means that my replies to others' items
would no longer show up (by default, anyway), in "My Stuff";
on the other hand, I don't think such replies are "mine" in
the same way that a Document, etc. is.

Comments, please?

Tres Seaver                                tseaver@digicool.com
Digital Creations     "Zope Dealers"       http://www.zope.org