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

Tres Seaver tseaver@zope.com
06 May 2003 10:24:06 -0400


On Tue, 2003-05-06 at 10:22, Shane Hathaway wrote:
> 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.

Weren't you arguing that (apparent, at least) attribute access was an
absolute requirement?  I don't see how to achieve that goal without
either:

  - Coupling the two classes directly,

or:

  - Wrapping the class to simulate the attribute access, hiding the
    existence of the adapter.

Also, I think I misunderstood you to say that you were pondering
solutions which wouldn't require the component architecture.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com