[Zope3-dev] spelling of namespace signifiers
Shane Hathaway
shane@zope.com
Wed, 05 Jun 2002 11:15:35 -0400
Steve Alexander wrote:
> Casey Duncan wrote:
>
>>
>> Just from a simple complication analysis of the above,
>> container/view--bar.html looks like a pretty viable option
>
>
> I agree. +1 from me.
>
> Earlier in this thread, Guido said he prefered that too.
>
> In an email conversation I had with Jim today, he mentioned a preference
> for this spelling.
>
>
> Are there any compelling objections to container/view--somename.html ?
>
> If not, I'll consider this to be the way forward, and make this change
> on the Zope3InWonderland branch.
I'll express my interpretation of the above in Python:
parts = traversed_name.split('--', 1)
if len(parts) == 2:
namespace, name = parts
else:
namespace, name = 'content', traversed_name
Is that your interpretation? Unfortunately, "--" can appear in lots of
valid filenames, especially since it's the standard ASCII representation
of long hyphens.
How about "container/--view-somename.html"? Then it almost resembles a
command-line option. ;-)
Still, I'm a bit leery of the namespace appearing in the final part of
the path. Here are my thoughts:
1) Our story is that the namespace qualifier isn't necessary for
non-containerish objects, and necessary for containerish objects.
2) It follows that relative links between views of containerish objects
will take a different form than relative links between views of
non-containerish objects.
3) Therefore views intended for non-containerish objects can't be used
on containerish objects. But views intended for containerish objects
can be used anywhere.
4) Wanting to reach a broader audience, Zope 3 developers will tend to
always use namespace qualifiers.
"container;views/somename.html" avoids this. But like Jim said, it
makes it a little harder to switch namespaces. How often will we want
to switch namespaces?
Shane