Re: [Zope3-Users] Re: What's the rationale of @@ ? Was: index.html
Jim Fulton wrote: This isn't really URL parsing, it's traversal. It's easy to plug in different traversal adapters. Are there any examples of this or docs? Chris - sorry if I'm missing something obvious :-S -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: What's the rationale of @@ ? Was: index.html
Jim Fulton wrote: This is a matter of policy. It is straightforward to change. Many people hate @@ and the ++view++name syntax. They will often arrange their item and view names so that they don't overlap. How hard is it to plug in different url parsing? It's often something people want to do their own way, and as you point out, some people don't like the default ;-) cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: What's the rationale of @@ ? Was: index.html
Chris Withers wrote: Jim Fulton wrote: This is a matter of policy. It is straightforward to change. Many people hate @@ and the ++view++name syntax. They will often arrange their item and view names so that they don't overlap. How hard is it to plug in different url parsing? It's often something people want to do their own way, and as you point out, some people don't like the default ;-) This isn't really URL parsing, it's traversal. It's easy to plug in different traversal adapters. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: What's the rationale of @@ ? Was: index.html
Hi, On Tue, Dec 13, 2005 at 02:02:05PM +0100, Andreas Elvers wrote: Hi all, what the rationale of @@ anyway ? I've searched for a definition for this in the Developer Handbook and elsewhere but it's hard to search for @@ and view. (To all Gurus: Please correct me, if I'm wrong) @@ marks a given path component explicitely as a view of the previous object. Example: http://zopeserver/contents.html Could mean either The object named 'contents.html' in the root folder or (if there is no such object) The 'contents.html' view (List of contained objects) of the root folder - the object is preferred. http://zopeserver/@@contents.html Will always display the list of contained objects of the root folder - no matter if there's a object 'contents.html' or not. I'm maintaining a wiki which tries to answer all those little questions around zope3. It's in german (Sorry, my employer depends on it): http://fbo.no-ip.org/cgi-bin/twiki/view/Zope/AtAt Regards, Frank ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: What's the rationale of @@ ? Was: index.html
Andreas Elvers wrote: what the rationale of @@ anyway ? One of the reasons is that it creates a name space. If you have a view of a container named foo what happens if you create an object in the container also named foo? Does the object hide the view, or does the view hide the object? With the @@ prefix you can disambiguate. -- Benji York Senior Software Engineer Zope Corporation ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: What's the rationale of @@ ? Was: index.html
Stephan Richter wrote: On Tuesday 13 December 2005 08:02, Andreas Elvers wrote: what the rationale of @@ anyway ? I've searched for a definition for this in the Developer Handbook and elsewhere but it's hard to search for @@ and view. For insight or pointer to documentation or source to this matter I'd be very happy. It is a shortcut for the ++view++ namespace. @@ looks like two eyes. ;-) More importantly: - It is short - It doesn't have any English words in it This is the most likely place where name spaces might appear in public URLs, so I wanted to make them as unobtrusive as possible. (If you work hard, you can avoid them altogether, but I don't expect most people to work that hard.) Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: What's the rationale of @@ ? Was: index.html
Jeff Rush wrote: Frank Burkhardt wrote: On Tue, Dec 13, 2005 at 02:02:05PM +0100, Andreas Elvers wrote: what the rationale of @@ anyway ? I've searched for a definition for this in the Developer Handbook and elsewhere but it's hard to search for @@ and view. @@ marks a given path component explicitely as a view of the previous object. Example: http://zopeserver/contents.html Could mean either The object named 'contents.html' in the root folder or (if there is no such object) The 'contents.html' view (List of contained objects) of the root folder - the object is preferred. http://zopeserver/@@contents.html Will always display the list of contained objects of the root folder - no matter if there's a object 'contents.html' or not. Hmm, but the '@@' is optional, as I can leave it off and still get the contents.html view if there is no object named contents.html in that folder. This would seem to confuse developers, as if there IS an accidental collision of an item name with a view that is unknown to the developer, it will return the view out of nowhere. No, it will return the view. Shouldn't the '@@' should be *required* on views to avoid this ambiguity? This is a matter of policy. It is straightforward to change. Many people hate @@ and the ++view++name syntax. They will often arrange their item and view names so that they don't overlap. It might be nice to have easily-configured alternate policies. For example: - require @@, as you suggest - log a warning, or possible raise an error in development mode, if, when you get an item, you also find a view with the same name. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users