[Zope] - Style question: Use of properties?

Andrew M. Kuchling akuchlin@cnri.reston.va.us
Wed, 30 Dec 1998 12:54:09 -0500 (EST)


I'm not clear on what purposes object properties are commonly used for
in Zope, and would appreciate some guidance from experienced
Zopeheads.

Here's the application: I want to mock up a customizable display of
channels, similar to what my.netscape.com does.  I've started by
creating a channels/ folder, which would contain little DTML objects,
one for each channel c1, c2, c3, ...

Users would be represented as a personal folder of their own.  Now,
here's where the uncertainty shows up: currently, I've created a
property named "clist", of type "tokens", that contains something like
"c1 c2 c3".  The selected channels can then be displayed by this DTML:

  <!--#in cl-->
    <!--#with channel-->
      <!--#var expr="_[_['sequence-item']]"-->
    <!--#/with-->
  <!--#/in-->

This displays the contents of c1, c2, c3.  However, this won't scale
if I want a more complex display; for example, if I wanted multiple
columns with different channels in each column, I'd really want a list
of lists instead of a single list of tokens.  

So... is using a property the right course of action for storing such
user-customizable info?  Or should I instead get the object
representing the folder, and attach my own channel_list attribute to
it?

-- 
A.M. Kuchling			http://starship.skyport.net/crew/amk/
The tendency to believe that things never change, the inertia of daily
existence, is a staple of living. It has always been a delusion.
    -- Donald A. Wollheim