[Zope3-dev] Re: proposed changes to contained helper functions

Philipp von Weitershausen philipp at weitershausen.de
Sat Oct 4 07:20:06 EDT 2003


Shane Hathaway wrote:
> 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'm not suggesting that DOM nodes must be accessible via URL, but I am 
> saying that the effort of making children addressable pays off quickly. 
> The specific case of DOM nodes may be an exception to the rule, although 
> previous Zope/XML projects have indeed attempted to map the DOM to URLs.

Actually, if we go back to the old ParsedXML implementation, we see that 
it was actually possible to access specific DOM nodes via URL. Whether 
that was useful is another question...

In Zope3, I would most probably do this using a custom traversal 
adapter. And that's where my point is: Parenthood is different from URL 
traversing. Parenthood and containment express relationships, traversing 
is parsing a path using relationships which aren't necessarily 
containment relationships (e.g. foo/@@view.html, ++etc++site etc.).

Philipp




More information about the Zope3-dev mailing list