[Zope3-Users] Re: I fold. What are ++etc++ and ++resource++ etc?

Philipp von Weitershausen philipp at weitershausen.de
Mon Jun 12 14:53:32 EDT 2006


Michael Dexter wrote:
>> My book (http://worldcookery.com) explains them, just look them up in
>> the index.
> 
> Where can I buy a copy for a reasonable price in Berlin?

http://worldcookery.com/WhereToBuy lists several online possibilities.
Of course, you should also be able to order it in any local bookstore.
They will usually have over night.

> My question is thus very naive: what is the ++xyz++ and @@xyz syntax and
> can it be avoided?

As I said in a reply to Chris, sure they can be avoided. But then you'll
run into the same ambiguity problems as in Zope 2.

>>>> Failing to find a clear explanation, I only see a ways for Zope3-based
>>>> sites to:
>>>>
>>> 1. Be toyed with by the user.
>>> How so?
>> "ooo look, pretty shiny things in urls, I wonder what they mean"
> 
> Skin variables in URL would be great during development but suggest that
> the user can make skin selection. Keep in mind I have no idea if
> ++thisskin++ is required as I cannot find the aforementioned explanation
> of that syntax.

No, it's not required. http://worldcookery.com is a Zope 3 site. Do you
see any ++namespace++ urls? I don't.

Note that ++namespace++ isn't just for skins, it's about invoking a
namespace traversal adapter. There are a few examples (these and others
are defined in zope.traversing.namespace):

* ++skin++MySkin is for skins
* ++resource++logo.gif is for acquiring resources (images, JavaScripts,
CSS, etc.)
* ++view++edit.html is for acquiring a view

Again, the reasoning behind their existance is that in Zope 2,
something/foo is ambiguous. Is 'foo' a view, a contained object
(=attribute), a resource? You wouldn't know. Whichever thing is acquired
first wins. That's why Zope 3 gives you the possibility to traverse in
different dimensions, not just content space. That's what traversal
namespaces do.

If you can live with ambiguities, you won't need ++namespace++ and @@.

> If @@ is for inspection, is this something the public
> can/should do? Security issues?

I already wrote to Chris: If the usage of traversal naemspaces provide a
security risk, there's something wrong with your application. This
wouldn't be the traversal namespaces' fault, though.

>>>> 2. Fall out of search engines.
>>>
>>> Why?
>>
>> Search engines don't particularly like weird characters in urls.
>> This can be extremely important for some users...
> 
> If my Zope2 site uses http://worldcookery.com/About and my Zope3 site
> uses http://worldcookery.com/++kewlskin++About then the existing links
> are presumably dead or inaccurate.

You're handwaving because you don't understand traversal namespaces.
This point is mute.

>>>> 4. Fail the over-the-phone test of URl's...
>>>
>>> Can you spell @@ or ++ over the phone? I can.
>>
>> Yeah, but you're one of the leading Zope developers in the world.
>> Try explaining it to someone with an IQ of 50 who just about knows
>> what a / (no, the *other* slash) and a . (yeah, the one without the
>> curly bit on the bottom of it) are ;-)
> 
> I put this in the same category as Plone's clean URL principle. When you
> tell a friend about your book, http://worldcookery.com/About is very
> clear. Amazon's
> http://www.amazon.com/gp/sitbv3/reader/ref=sib_dp_top_idx/102-2282457-8274534?%5Fencoding=UTF8&pageID=S0DD&asin=3540223592#reader-link
> is slightly less so, as with anything in between. Semi-informed users
> will also assert that URL's don't have +'s or @'s and they probably
> haven't read RFC2396.

You're comparing the Virgin Mary with Satan himself there. If you can't
manage to spell "@" over the phone, then good luck spelling your email
address. And again, you won't have to if you don't want to.

>>> Plus, no one says ++ and
>>> @@ have to occur in a public view of Zope 3 site. Go to
>>> http://worldcookery.com. You won't see much of @@ or ++.
>>
>> Good, I'd love to know how to produce a whole Zope 3 app without these
>> weird appendages...
>> (and yes, I know why they're there, doesn't mean I like 'em any more ;-)
> 
> I'm still trying to figure out why they're there. :)

See above. The keyword is ambiguities.

>> That depends on your application based on Zope. You can try to avoid
>> generating URLs with @@ and ++, but we generally don't consider these
>> URLs harmful in any way.
> 
> Try to avoid or avoid? Mr. Withers seems to agree that clean URL's are a
> good thing, along with the Plone team.

Well all want clean URLs, but we happen to have different tastes. Some
people I know think it's pure blasphemy to have upper case characters in
URLs. What can I say...

You can avoid it in your URLs. Launchpad.net does it, for example.

>> Sounds like you want to volunteer :)
> 
> Happy to once I "get it" but alas, I still don't. I do sincerely
> appreciate Zope's overall use of precise terminology but that
> terminology must be spelled out very carefully in layman's terms if you
> are to not frustrate the uninitiated.

My book explains it. So do the links I pointed you to in my first reply.
This mailinglist thread will also have done its share.

Philipp



More information about the Zope3-users mailing list