[Zope-PTK] Refactoring Discussable
Dan L. Pierson
Thu, 27 Jul 2000 15:06:19 -0400 (EDT)
Steve Alexander writes:
> Thinking about this, there's no reason why PTK can't ship with an
> "Immuatble Discussable" base class. This meets many needs.
> If I want a site where discussion items are owned, in a stronger sense,
> by contributors, then I can make my own base-class for this.
> Can we define an interface that abstracts over different implementations
> of discussable content?
The current Discussable is a bit of a motly collection of features,
IMHO. Most of them may be useful, but I think we can remove some of
the UI features from a (all!) PTKBase class. Here's a quick cut:
def createReply(self, title, text, REQUEST, RESPONSE):
This forces the reply to be a DiscussionItem with text format
of structured-text. This should be configurable.
That's it. Of the other methods currently in Discussable:
def getReplyLocationAndID(self, REQUEST):
Shouldn't be a method of the base class. Might be a method of
a derived class, but I think it should be in the portal itself, which
may choose to implement it by calling a derived class method.
Needs to be user configurable, thus shouldn't be in the base.
Of course, a default method should be provided.
I think that this should at least be a switch that can be set
by a portal manager.
I don't think that portal UI details should be part of classes
like this. For example, if my portal UI always shows replies below
the main item, why should I have to have a redundant show replies