[Zope3-dev] zwiki: performance of findChildren()

sean.upton@uniontrib.com sean.upton@uniontrib.com
Mon, 05 May 2003 14:41:25 -0700


Forgive my ignorance, but can descriptors be added to instances and not just
classes? 

Sean

-----Original Message-----
From: Shane Hathaway [mailto:shane@zope.com]
Sent: Monday, May 05, 2003 2:34 PM
To: sean.upton@uniontrib.com
Cc: tseaver@zope.com; klm@zope.com; zope3-dev@zope.org
Subject: Re: [Zope3-dev] zwiki: performance of findChildren()


sean.upton@uniontrib.com wrote:
> Not magical, but simple: what about wrapping the object with properties
> instead of hard-coding descriptors into the class?  Assume the get/set
> functions for the property added by the wrapper use a relationship
> management service.  It isn't really "transparent" - but it only has to be
> done once in code that uses multiple relationships. All application code
> interested in reading/writing relationship info has the responsibility to
> wrap.

Well, the relationships envisioned exist in the data model.  Since 
object oriented databases implement the data model through classes and 
attributes, it is natural to make more flexible relationships available 
in the same way.  Using descriptors is no more hard-coding than storing 
attributes.

Shane