Grokbase
Topics Posts Groups | in
x
[ help ]

Re: [Catalyst] Re: Subsessions?

View PostFlat  Thread  Threaded | < Prev - Next >
Yuval Kogman Re: [Catalyst] Re: Subsessions?
| +1 vote
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
On Sat, Sep 29, 2007 at 06:55:14 +0200, A. Pagaltzis wrote:
> * Rainer Clasen <bj@zuto.de> [2007-09-27 12:25]:
> > After saving some data I want to redirect the user back to
> > where he came. So I'd like to keep track where the user came
> > from. As I expect the User to use several Browser windows,
> > neither Cookie based Sessions (incl. stash) work in all
> > scenarios. Right now I'm using the HTTP Referer, which I'm also
> > considering a bit clumsy.
>
> 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.

For what it's worth, I agree.

Sessions are like a half assed model with automagical fetching of
the resource to save some time. The moment the app becomes dependant
on this from a design POV things get nasty quite fast.

Think long and hard if your heavy use of the session is not better
done as some proper model.

Cheers,

--
  Yuval Kogman <nothingmuch@woobling.org>
http://nothingmuch.woobling.org 0xEBD27418


_______________________________________________
List: [email protected: Cat...@lists.rawmode.org]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/

Thread : [Catalyst] Subsessions?
1)
Rainer Clasen Hello, there are currently two Problems I could easily solve with subsessions. After saving some...
2)
Yuval Kogman A somewhat naive idea: sub session { my $c = shift; if ( my $sub = $self->subsession_id ) { return...
3)
Rainer Clasen Thanks to both of you. Your responses helped a lot to sort my Ideas and hack up my initial "poor...
paperclip
4)
Zbigniew Lukasiak Interesting. I usually use GET parameters for that - but I can imagine where it would become not...
5)
A. Pagaltzis You’re asking the wrong question. Sessions are a bad idea in general; application state should...
6)
Yuval Kogman For what it's worth, I agree. Sessions are like a half assed model with automagical fetching of the...
7)
Rainer Clasen I also consider "normal" sessions evil. My subsessions are still ugly, but at least they keep the...
spacer
View PostFlat  Thread  Threaded | < Prev - Next >