[Catalyst] RFC on how to structure controllers

Daniel McBrearty danielmcbrearty at gmail.com
Wed Jun 14 04:15:24 CEST 2006


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

I think this works well for things where the state is for a variable
which is used fairly globally across the app.

Don't forget that if you put state in the URL, and have menu items
available on the page, you will need to keep that state in all those
menu items, or lose it when the user clicks. This can be a pain,
unless the state is truly something that is needed everywhere in your
app.

also, URL's can get unmanageable and unreadable - personally I prefer
URL's that mean something to the eye.

-- 
Daniel McBrearty
email : danielmcbrearty at gmail.com
www.engoi.com : the multi - language vocab trainer
BTW : 0873928131



More information about the Catalyst mailing list