[Catalyst] url parsing and sub controller
Allen S. Rout
asr at ufl.edu
Wed Sep 7 04:23:01 CEST 2005
==> On Tue, 06 Sep 2005 07:48:28 +0200, Danijel Milicevic <Danijel.Milicevic at rawmode.org> said:
> First off: sorry for my weird first reply - I could barely understand it
> myself after reading it this morning. I blame the tequila and will
> supply .diff's in the future if this happens again. ;)
Tequila good. ;)
> Best practice tells me that you should keep MyApp.pm as simple as possible -
> no public (Local/Global/Path/Regex) actions in MyApp.pm. There are a couple
> of reasons for this beside the obvious ones (controller logic belongs to
> controllers, MVC), but the most important one to me is, that it's not
> reusable. We got controller inheritance so keeping a good MVC-like
> seperation also gives you the benefit of (more or less) independent and
> reuseable controller-code.
OK, understood. And I re-read the pod references you noted before completing
this sentence.
Here's what I -think- I want for this application, though I'd be happy to be
educated otherwise.
I've got a cluster of sub-apps, each of which is implemented in its' own
controller. The entire cluster works on grossly the same dozen data types. A
few of them use all the types, most use a varying 3-5 of them.
So I figured I should do all the argument handling once, at the MyApp level;
this would decrease the instances of duplicated code between the various
controllers.
And as I type this, I realize I had a brain-o [like a typo, but it's just
saying something stupid. ;) ] the process_args I had in mind, and coded, was
private not global. Does this make the idea sound less stupid?
- Allen S. Rout
More information about the Catalyst
mailing list