[Zope3-dev] No redirect!

Marcus J. Ertl marcus.ertl@larp-welt.de
Mon, 28 Apr 2003 15:31:26 +0200


On Mon, 28 Apr 2003 14:57:21 +0200, Steve Alexander wrote:

Hi again!

>The common pattern in Zope 3 is
> [...]
>The default view name for most things is 'index.html', but you can 
>change this for a particular type if you need to.

Yes, that's right! I know about thas!

>(Note that I am not discussing different skins here. That's a separate 
>issue.)

Yes, that's something else! (But I still have many questions about
them!)

>> chose somewhere a short view without heades, under this url, I will see
>> a short message, with now headers, but if I set a full view, I will see
>> under the same url a full message view with all headers.
>How do you choose these views?

In something like "user settings". For example the users of my forum,
should be able to set, in which form they want to see a diskussion
thread: threaded, flat, each message on thier own... So looged in Users
get a "Settings Page" where they my choose!

If they now go to /board/thread, they get the message with their
choosen view! If they choose a different style/view, they may go to the
same url, but now get a different view! Old bookmarks still work, but
deliver the newly choosen style! :o) It's the same thread, but only
rendered different!

>I URL typically points to the view on some content.

For me as a stupid user, a url point to the place, where I will get
some information. There is nothing in my world like "views". If I
bookmark a site, I bookmark the place of some information. If I put a
mark in a real book, I alos mark the place, where I found important
information, and not the place, where I found important information
printed in times roman on din a5 cutted paper! The view doesn't matter
to a user!

Something else:
What I loved at zope2 was the posibility to have human readable urls! I
hope we will get them back in zope3! At the moment, things like
/++skin++lnforum/forum/message aren't that nice! I loved to may able to
call my granny and tell her: "have a look at
http://www.myplace.lcl/vacations/paris for my photos of paris!". But I
don't really want to tell my granny "go to
http://www.myplace.lcl/++skin++nicelayout/vacations/paris/defaultView"!
That's not that nice!

>This is the default way traversal works in Zope 3. Zope 3 is flexible 
>enough to support different traversal mechanisms, and different policies 
>for choosing the view for a particular request.
>
>Provided you have a consistent and well worked-out policy, you should be 
>able to implement this for your content-types if you need to.
>
>
>>>>path end up breaking the browser's back button, as well as exposing
>>>>non-bookmarkable URLs.
>> Sorry, but I don't see, why this should happen!
>Let's say I go to the page
> [...]

Your point!

So I have to choose the right combination of returning views, and
redirect to them!

(Strange, I did the right thing, without thinking about it!)

>>>>The spec also blesses the frequent-but-noncompliant
>>>>current usage of 302 response codes
>> If the RFC do this, I even don't like it! :-( Sorry! If a browser
>> connects to a url, in my point of view, it should get an correct
>> answer, not a "look there"!
>Why?

I think of this as a unecessary roundtrip browser, server, browser,
server.... It seems inefficient to me!

>> view = getView(self.context, 'myView', self.reqeust)
>> return view()
>If myView contains something like a self-posting form, then this code 
>will render a page that will not work properly. It will not be honouring 
>the expectation of the myView page that the URL of the request is the 
>URL to get to the page.

Hmmm, works fine for me. And it's much more easy that way to handle the
content of the request to the view, then with a redirect!

If I do a redirect, I loose the request! I have do encode it in the
url! (Maybe I'm wrong at this?) Have to use urls like
/board/message/post?subject=subject;body=the-whole-body;adn=so-on....!
That's even bad in my pov, because I lofe clean urls!

>Many pages in Zope 3 have this expectation. Redirecting with a 303 is 
>much better than returning the contents of a different view.

Pehabs both ways may be right in some cases?

Bye
  Marcus
-- 
 Das LARP-Portal im Internet:
LARP-Welt: http://larp-welt.de

!fantasy