[Zope3-dev] Re: proposed changes to contained helper functions
Philipp von Weitershausen
philipp at weitershausen.de
Sat Oct 4 07:17:35 EDT 2003
Fred L. Drake, Jr. wrote:
> Shane Hathaway writes:
> > Giving a unique name to each child serves the purpose of making all
> > children potentially addressable via URL. That's one of the sweet spots
> > of Zope; it makes the system discoverable and clear. I think a decision
> > to not use this pattern should be weighed carefully. In particular, if
> > an object is not addressable via URL, it is quite difficult to provide a
> > Web user interface for it or any of its descendants.
>
> He's right not to use names here; the DOM is well-defined. Exposing
> individual node of the DOM directly via Zope is questionable (IMHO),
> but I don't know if that's what he's doing.
>
> I think he just wants to use part of the published interfaces in his
> internal structures. I hope that's all this is about. ;-)
If this is about ILocation/IContained, then the answer is no. I would
like to use some general machinery which, of course, would certainly use
interfaces. I could imagine the following ones, for example::
class IChild(Interface):
__parent__ = Attribute(...)
class ILocation(IChild):
__name__ = Attribute(...)
class IContained(ILocation):
pass
Adapters that are about parenthood could be registered for IChild rather
than ILocation, for example. That's the "machinery" I'm talking about :).
Philipp
More information about the Zope3-dev
mailing list