[Zope3-dev] PythonProgrammerTutorial
Phillip J. Eby
pje@telecommunity.com
Thu, 06 Dec 2001 07:22:05 -0500
At 11:52 PM 12/5/01 +0000, Chris Withers wrote:
>Jim Fulton wrote:
> >
> > Yup. It may very well turn out that semicolons will
> > not be needed often, through other namespace control
> > approaches.
>
>This, for me, is that best way :-)
[Also posted to ComponentArchitecture wiki]
So what's wrong with using a leading "_" as a "meta" or "escape" indicator?
E.g.:
ob/_view/edit
Meaning, "go to the view namespace, then go to edit". Yes, it's a naming
convention. But so far all the Z3 examples and code I've seen outlaw
leading underscores in path segments. This would make that outlawing
actually mean something. :)
And, of course, this syntax allows for clean relative URL's. If a way to
specify parameters is needed, perhaps something like this:
ob/_view,id=spam,content-type=.Widget/form
would do the trick. While "," is no more or less valid than ";" in URL's,
there are at least other application servers which use "," in URL's, so
authors of the various clients (including e-mail and other tools which
highlight in-line URL's and make them linkable) are more likely to have
been tested with them.
There is an interesting dilemna for relative URLs when dealing with
parameters other than a namespace, using almost any approach. Do you keep
the parameters, or not? My gut feel is no, you don't want to, because the
other parameters aren't relevant to another URL, which makes me wonder if
they should be in the "upper" part of the URL at all. But then, maybe I'm
misunderstanding the purpose of the "id" and "content-type" parameters
being used as examples.