[Catalyst] RFC on how to structure controllers

Sebastian Riedel sri at oook.de
Wed Jun 14 08:18:53 CEST 2006


13.06.2006 21:42 A. Pagaltzis:

> * Gert Burger <gburger at mweb.co.za> [2006-06-13 12:35]:
>> I would like some ideas on how todo the following in cat.
>
> In general, the web way is to make as much state as possible
> explicit in the URI. Avoid the use of sessions and cookies
> wherever possible, try your darndest to use information from the
> URI instead. (Also make sure to return appropriate HTTP status
> codes when handling arbitrary URIs, instead of just saying 200 OK
> to everything.)

Why would you *want* to avoid sessions?
It's much easier to manage sessions than complicated URI conventions.

This blog post by Avi Bryant describes it very well imo.

     http://smallthought.com/avi/?p=14

     "There are 3 models:

         Need quick response, but don't need back button or bookmark:  
Ajax
         Need back button, don't need bookmark: Continuation/Callback
         Need bookmarking or other external access: REST"

> Whether you put the information in the URI into the query string
> or into the path is not that important in terms of webarch; the
> main advantage of using the path part is simply that it looks
> prettier.

But why would a multi page wizard or ajax requests to have  
bookmarkable URIs?

--
Sebastian



More information about the Catalyst mailing list