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

Chris Withers chrisw@nipltd.com
Wed, 29 May 2002 16:03:33 +0100


Jim Fulton wrote:
> 
> > 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

I'm not sure if you're deliberately missing the point ;-)

What happens if you have two methods from _different_ view objects that have the same
name? How would you distinguish between them in this new way of doing things so that the
right one gets used?

Isn't this simplification recreating some of the namespace confusion we suffered from so
badly in Zope 2? (ie: which view does this method come from?)

> 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:

I'm sorry, there's a bit of that sentence which is missing :-S Can you put it in?

> > 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

Hmm... this strikes me as sucking somewhat :-(

For starters, having files called pdf.pdf is about as useful as having a file called
'download'.
Secondly, saying that the :: bit isn't important 'cos you'll never use it on containers
isn't true, certainly in some of the usecases I can think of :-S

> > 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. ;]

I pretty sure I did comment. Maybe the HTTP POST didn't get trough. In any case, I've
commented now.
Even if the majority don't go for this method of URL traversal, will it still be possible
for me to easily plug it in when I start using Zope 3?

cheers,

Chris