[Zope3-dev] Re: Dependencie-handling

Shane Hathaway shane@zope.com
Tue, 01 Jul 2003 15:24:42 -0400


Philipp von Weitershausen wrote:
> Martijn and I basically had the same idea when we implemented XML Schema 
> interfaces at the LLN sprint. See 
> http://cvs.zope.org/Zope3/src/zope/app/xml/README.txt?rev=HEAD (this 
> corresponds very much with Jean Jordaan's reply, too).

URIs are commonly associated with XML namespaces and XML schema, but I 
think the real purpose of URIs is to replace cryptic GUIDs (globally 
unique identifiers).  It took me a long time to figure this out.

> At the sprint, Martijn kept joking about how dotted names really are 
> abbreviated URIs (like: a web browser understands the abbreviation 
> www.zope.org and expands it to the URI http://www.zope.org). Now that 
> you mention this direct association between interfaces and URIs, it 
> doesn't seem that far fetched anymore, does it?

Well, I would put it the other way: URIs expand upon the concept of 
dotted names.  Dotted names came first. ;-)

> This calls for a proposal. If Marcus could provide a well defined 
> UseCase, then maybe we (Shane and I) could write something up?

BTW I neglected earlier to fully describe why this thread has anything 
to do with URIs.  If anyone didn't see the connection: if a product 
depends on URIs rather than interface objects, it requires users to 
install fewer dependencies.

Let's say I create a product that defines IDocument and a basic 
implementation of IDocument.  If you write a product that improves upon 
and replaces my implementation, you still have to tell users of your 
product to install my product in order to make my interface available to 
your product.  99% of my product goes unused, yet it takes up a small 
amount of RAM and startup time.  But if instead I declare that IDocument 
corresponds with the URI "http://example.com/ns/IDocument", you can 
avoid importing my copy of IDocument and just say that your objects 
implement the interface described by the same URI.

Shane