[Catalyst] Re: Subsessions?

Rainer Clasen bj at zuto.de
Sun Sep 30 10:25:31 GMT 2007


A. Pagaltzis wrote:
> You???re asking the wrong question. Sessions are a bad idea in
> general; application state should live on the client, not the
> server. All state on the server should be resource state, ie it
> should have a URI of its own.

I also consider "normal" sessions evil. My subsessions are still ugly, but
at least they keep the state control in the client.

The subsessions were my answer, when I failed to setup the Chained
Dispatcher according to my laziness. And once available, subsessions
became the quick answer to other questions. Woken up by your feedback I'll
give the Chain another try (and actually it seems a lot easier having won
some Catalyst insight during the Subsession efforts).

So the "select a user once" is kind of solved.

Is there an elegant way to keep track of where the user came from? I
consider my Referer-based redirect after edit/delete/add actions a bit
clumsy. 

Well, I could add edit/delete/add actions to each context to where I'd
like to call them: 

 /diary/<diary_id>/edit
 /calendar/2007/9/30/diary/<diary_id>/edit
 /calendar/2007/9/30/diary/add

But what about the "diary/add" link in my navbar? Does this mean I have to
put a ".../diary/add" action into each context?

And how shall I deal with GET/POST parameters of the referring context?
Say I want to call "/diary/search/<diary_id>/edit" from 
/diary/search?notes="regexp"&daybegin="2007-09-01"

Is there a "best practice" for this? Is this something answered by the the
mentioned oReily book?

Rainer

-- 
KeyID=759975BD fingerprint=887A 4BE3 6AB7 EE3C 4AE0  B0E1 0556 E25A 7599 75BD



More information about the Catalyst mailing list