[Catalyst] Re: Subsessions?
Rainer Clasen
bj at zuto.de
Wed Oct 3 10:10:50 GMT 2007
Matt S Trout wrote:
> On Sun, Sep 30, 2007 at 11:25:31AM +0200, Rainer Clasen wrote:
> > 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.
>
> So you failed to make a basic feature of Catalyst work.
well no. I looked at the Chained stuff and was distracted.
With the input from the list I've ditched the Subsessions and went for
Chained because it seems to be the "RightThing" - although Subsessions are
a quite comfortable solution: Once setup, they're available everywhere
within the application, no need to worry anymore.
That's quite the opposite of Chained. Nearly all URIs in this project look
like /<athlete>/diary/list or /<athlete>/exercise/add. This means all
actions have to be setup for chaining manually, CaptureArgs have to be
verified on each request, uri_for becomes a hassle to use and last but not
least the chance to break the natural URI to Controller namespace mapping
is quite likely.
Rainer
--
KeyID=759975BD fingerprint=887A 4BE3 6AB7 EE3C 4AE0 B0E1 0556 E25A 7599 75BD
More information about the Catalyst
mailing list