[Zope3-dev] Re: Better access to APIs in paths (was Re:needingviewsclues - template/title troubles)

Shane Hathaway shane@zope.com
Thu, 27 Feb 2003 08:53:30 -0500 (EST)


On Thu, 27 Feb 2003, Chris Withers wrote:

> Shane Hathaway wrote:
> > 
> > If prefixes map directly to components or interfaces, the new syntax is 
> > really specific to Zope.  Every time you want to create a new API, you 
> > have to be sure no one else has staked a claim to the prefix you want. 
> > Even if you're using page templates outside Zope, you have to be sure no 
> > one in the Zope community has taken your prefix, because you might want 
> > to interoperate with Zope someday, and you don't want to change your 
> > prefix.  So effectively, all the namespaces are centralized and 
> > controlled by Zope.  That could be a problem for interesting prefixes 
> > with ambiguous meanings like "workflow", "versions", "api", "db", etc.
> 
> This is an amazingly good point and a very good reason to go for
> namespaces IMNSHO... Could they be made easier to swallow by allowing
> 'default' namespace-to-prefix mappings being made outside the template
> or would this leave us back at this problem?

Default prefixes are good for two cases that I can think of: common
minimal presentation operations that are currently difficult to write but
shouldn't be (and shouldn't require any Python), and access to core Zope
APIs (to make writing templates easy in Zope).  There's no conflict in
those cases and the default prefixes would be a service to all template
authors.

> > The crucial difference between Jim's point of view and mine is the 
> > number of namespaces (APIs) that should exist.  Jim wants one.  I want 
> > many--countless, even.  If there is only one namespace, or very few, 
> > URI-bound namespaces are an irrelevant distraction.  If there are many 
> > namespaces, we need URIs for at least two reasons: to blend with 
> > existing conventions, and for decentralization.
> 
> ...which means I'm +1 for lots of namespaces and URIs...

Cool. :-)  I guess I need to write a proposal so we can be sure we're
agreeing to the same thing.

Shane