[Zope-PTK] Remembering information member-by-member
Dennis Nichols
nichols@tradingconnections.com
Fri, 14 Jul 2000 10:48:24 -0500
This might be off the wall, but please let me know what you think...
I would like an object, such as a poll object, to say to some (membership?)
object, "please note that member X has now taken poll Y". And then later,
be able to ask "has member X has taken poll Y?"
Here's how I conceive of it...
The poll (or whatever) object specifies a name of an attribute, attribute
type (bool or string?), and a value to be set or returned. If the
(membership?) object has never heard of this attribute, it creates another
column or table incorporating the attribute's name and stores the value (a
similar operation on retrieve). Allowing specification of the attribute
type seems wise for memberships in the 100,000 to 1,000,000 range.
Does this partitioning seem rational? Should it be the membership object
providing this service? The membership object could choose to store these
attributes any way that it wished. New calling objects could depend upon
the membership object to store/retrieve any new attribute that it might
need (for example, the object for poll W will want to know about "taken
poll W"). The other options would be to have the poll (or whatever) objects
implement a storage scheme themselves (sounds way yucky), or to have a
third object that stores the attributes. The membership object occurred to
me first because it stores other attributes by member (last login time, for
example).
Is this a wise approach?
If so, any suggestions about implementation?
Should the attributes be private to the object that stored them?
If not, how does one manage the attribute naming?
I fully expect to be told that Racks/Patterns/Specialists/Diplomats/... can
do exactly this, but lordy, I find it so difficult to get my head around
that stuff that I can't tell.
Less-dazed-and-wanderingly-than-before,
-dennis
--
Dennis Nichols
nichols@tradingconnections.com