Ideas for Discussable ( was Re: [Zope-CMF] Question on Disscusable Content Types)

Chris Withers chrisw@nipltd.com
Tue, 26 Jun 2001 15:33:19 +0100


Shane Hathaway wrote:
> 
> I expected you would.  The portal_discussions tool isn't as smart as it
> should be.  All we ask is that you keep the process open by telling us
> what you think should change (and why).  And publish interfaces.

Well, here's what I got so far...

I want to store the discussion structure in the discussion tool rather than
hanging it off the content object, although the talkback attribute might still
provide a useful hook into the right bit.

Catalog meta_data actually sparked off the idea.

The discussion structure would be stored by a tree of very lightweight objects,
something like the following (which feels very similar to ZCatalog brains to me,
but tree rather than table based):

class Node

   children attribute - stores references to other Node objects in a list
   parents attribute  - likewise, but for parents
   path               - the Path of the object this node refers to. Is there 
                        any reason why it would be bad to store a real object 
                        ref here? ie: self.path = anobject?

   *metadata*         - TTW configurable

I was planning to have a BTree mapping object paths to Nodes, but I wonder if
the talkback attribute could be used to store a direct reference instead? Again,
why would this be bad? Unfortunate cyclic references excepted (does Zope 2.4 fix
this?)

At the moment, this will all be kicked off by direct calls to the discussion
tool in methods like discussion_reply_edit and the like. Obviosuly, I can't wait
for the PortalEvents tool so this can be doen mroe gracefully.

Lemme know what you think :-)

cheers,

Chris