[Catalyst] Re: Redispatching actions

Bernhard Graf catalyst2 at augensalat.de
Mon May 21 22:29:03 GMT 2007


Roland Lammel wrote:

> But then again this code has to be added to every method, that is
> processing form input. In case it's not there... the nightmare of
> reposting is back in town.

What are you trying to demonstrate?
"If more code isn't there, even more nightmares are in town" - or what?

> I find it far more easy to actually perform a redirect at the end of
> an action, that is intentional for the user and the developer.
> I havn't come across any problems using redirects (not even on mobile
> devices), so what kind of problems are you referring too?

- Loosing state within one http request or maintaining additional
  overhead to keep it beyond the redirect
- imposing additional load to the server
- trouble GET after POST under mod_perl as described in
  http://perl.apache.org/docs/1.0/guide/snippets.html#Redirecting_POST_Requests .
  Well, actually I suspect Catalyst already does the right thing, but I
  was bitten by this issue long ago in the pre-Google era when you could
  hardly find anything about this on the WWW.

> But as usual, it's probably a matter of taste anyway.

Indeed. Whenever I have to fix somebody else's web application (usually
PHP), the number of HTTP redirects is inversely proportional to the
quality of the code. So probably that is the main reason why I try to
avoid them personally.
-- 
Bernhard Graf



More information about the Catalyst mailing list