|
|
| Perl: the Markov chain saw | |
| PerlMonks |
Re: Why CGI::Application?by dragonchild (Archbishop) |
| on Jan 13, 2004 at 13:10 UTC ( #320946=note: print w/ replies, xml ) | Need Help?? |
|
Being someone who just implemented his first CGI::Application code yesterday (replacing a current app), let me tell you what C::A does for you.
Also, you might be confusing something I was having issues with, at first. I originally thought I needed to implement my entire application as one monolithic C::A app. But, a friend of mine showed me what his company did. They have some 20 different C::A's that all work together, passing responsability off as necessary. They have one main C::A, which handles logging and the homepage. Then, every major subsystem (reports, user admin, preferences, etc) have their own C::A. If something is complicated, create another C::A inside that. His rule of thumb was 10-12 states, at most. More than that and you should look at breaking it up into two C::A's (if possible). Also, every one of your C::A's inherits from some abstract superclass that inherits from C::A, which implements things like how to connect to the DB, what CGI class to use, how to display, and other basic functionality. ------
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||