[Zope3-dev] Re: Views on Views ;-)

Jim Fulton jim@zope.com
Wed, 29 May 2002 10:00:12 -0400


Chris Withers wrote:
> 
> Jim Fulton wrote:
> >
> > - I really like the idea of explicitly defining the pages provided by
> >   views and having the pages appear as pages on the content. This
> >   makes page construction feel more natural, eliminating the extra URL
> >   step for the view.
> 
> I may be missing something here but I'll shout up anyway ;-)
> 
> My impression of Zope 3 URLs was that it would let you do:
> 
> http://server/folder/something/view1;view/page_in_view.html
> ...which submits to the method:
> http://server/folder/something/view1;view/method_in_view1
> ...which in turn returns to a second view of the object:
> http://server/folder/something/view2;view/page_in_view.html
> 
> How would that look in the new way of doing things?
> How would you distinguish between page_in_view from view1 and page_in_view from
> view2?

http://server/folder/something/page_in_view1.html;view

which submits to some method in view 1

which in turn returns (gives a link? redirects?)
to a second view of the object:

http://server/folder/something/page_in_view2.html;view

Note that if the view and content namespaces of something (e.g.
something is not a container), you can omit the namespace 
qualification:

http://server/folder/something/page_in_view1.html
http://server/folder/something/page_in_view2.html


> >   Given this, I wonder if we should switch to the namespace syntax
> >   used by XPath (and perl and C++ ;)::
> >
> >      aFolder/view::grants.html
> 
> Hmmm... does that mean if I have:
> 
> myDoc/view::pdf.pdf
> 
> ...when I click to download I get a file called view::pdf.pdf?

Yup, except that myDoc is probably not a container, so you should be
able to use::

  myDoc/pdf.pdf
 
> That in turn raises the question of what happened to the idea of:
> 
> myDoc.pdf
> 
> meaning "give me the 'pdf' view of the 'myDoc' object?"

Well, I wrote up a proposal at:

http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/NameExtensionViews

So far, I'd say the response has been luke-warm. I see you haven't
commented. ;]
 
Jim

--
Jim Fulton           mailto:jim@zope.com       Python Powered!        
CTO                  (888) 344-4332            http://www.python.org  
Zope Corporation     http://www.zope.com       http://www.zope.org