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

Barry Pederson bp@barryp.org
Mon, 24 Feb 2003 13:17:46 -0600


Steve Alexander wrote:
> 
> Do you mean this?
> 
>  <html tal:adapters="dc zope.app.interfaces.dublincore.IZopeDublinCore;
>                      sf zope.app.interfaces.formatting.IStringFormats">
> 
> 


Oops, you're right - I had been looking at some python code that just 
referred to the actual interface name, and forgot that there were import 
statements up at the top of the file with the full package leading up to 
it. But yeah, if that's what it takes to accurately specify an adapter.


 > Namespaces start to look more attractive to me -- there's an obvious
 > place to look up documentation listed right in the source.
 >

I guess I'm not hung up so much on whether it's called "tal:adapters" vs 
"tal:namespaces",  but I think using actual python module names would be 
preferrable, so you don't have to have an extra set of rules to deal 
with...if your adapter package name is x.y.z, your tal:namespace uri is 
http://something.else.

And how likely is it that for various small adapters that get written, 
somone will maintain a website with the corresponding documentation? 
I'd think an actual package name, which you know must refer to a file in 
your Zope3 installation, would be an even more obvious place to lookup 
documentation.

Perhaps some kind of online-help-service within Zope3 could take a 
package name submitted in a webform, fetch the interface and display it 
nicely formatted somehow.


 > I guess it all depends whether the audience for this feature is
 > happier with namespace URNs or with python module names.

My guess would be that template writers won't really care either way, 
they'll happily enter whatever they have to, following whatever workable 
examples they're given.

I think it'll boil down to: is there any worthwhile benefit to 
indirection that's worth the extra effort?

	Barry