[Seaside] Seaside redirects, really?
jfitzell at gmail.com
Tue Oct 4 14:52:20 UTC 2011
On Mon, Oct 3, 2011 at 9:46 PM, Pat Maddox <patmaddox at me.com> wrote:
> On Oct 3, 2011, at 4:29 AM, Julian Fitzell wrote:
>> On Mon, Oct 3, 2011 at 12:26 PM, Lukas Renggli <renggli at gmail.com> wrote:
>>>>> Similarly the redirects serve a well
>>>>> thought purpose.
>>>> which is what exactly?
>>>> can you describe that well thought purpose?
>>> Decouple the callback processing from the rendering.
>> Thus ensuring that (a) hitting refresh doesn't re-trigger an action
>> and (b) you don't get the browser dialog asking if you want to
>> resubmit form data when you hit the Back button.
> Seems like this ought to be easily doable with a boolean somewhere. Did we run the callbacks for continuation asdfa123? If so, don't run them. No redirect necessary, no double callbacks being run on refresh. Still have the "do you want to resubmit this form" alert, but I've never been concerned about that and don't particularly understand why people are.
Well it drives me nuts. I find some sites almost unusable because
every time I hit Back I get that stupid dialog.
Look: the separation of action phase and render phase is a key part of
the RenderLoop package. The redirection between them, however, is not
mandatory if you really don't want it. WAActionPhaseContinuation
extracts the decision about whether to redirect into a method
precisely so that subclasses can easily change the behaviour. And the
continuation classes to be used by your application are specified in
configuration parameters precisely so you can subclass them.
However, if you don't want to redirect, you don't really need the
RenderLoop as it currently exists at all. The loop is only split into
two continuations in order to allow the split between the two phases.
If you intend to perform the same processing on every request, you
might be better to just write a single WASessionContinuation subclass
that does exactly what you want and use that instead.
If enough people found the redirect problematic, we could of course
make it configurable but actually, I feel like it once was
configurable many years ago and we removed it because nobody changed
it from the default.
More information about the seaside