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

Shane Hathaway shane@ZOPE.COM
Tue, 06 May 2003 10:22:49 -0400


sean.upton@uniontrib.com wrote:
> Shane says relationships in this sense "exist in the data model."  I'm
> trying to understand whether this is a statement that "all
> relationship-management should exist in the data model" or rather that, in
> the sense of specific applications, they should exist in the data model of
> the class defining a particular type of object?

It's #2. :-)

> For general purpose relationship management, one would hope that new type of
> relationships can be bolted onto existing legacy, and dumb objects.  At the
> same time, one would hope not to have to call a service or function external
> to the object just to get its relationships.  Wrapping an object would
> accomplish both, with only a bit more work, I think (and classes using
> descriptors for these relationships would work too; I'm just suggesting that
> descriptors and properties via wrapping may not be mutually exclusive).

You're talking about adding attributes to objects by wrapping them. 
Zope 2 used that pattern for implicit acquisition.  Zope 3 replaces that 
pattern with adapters.  If you want to ask for a relationship that an 
object is not aware of, you should expect to retrieve that information 
from an adapter or service.  Hence more wrapping is unnecessary.

Shane