in reply to CGI::Application - why?
You might as well ask why bother making subroutines, or why bother using OO, since the answers are essentially the same. To give you a real world example, at my work we have built a base class that automates the common pattern of show the form, check for errors, show the errors or process the input, and show a confirmation page. We can add new forms with all of that functionality by filling in a couple of methods (the validation profile and the processing for successful input). We also got a bunch of this for free by using CGI::Application::Plugin::ValidateRM.
Usually, OO and modular code are not about reducing code size. They are about isolating pieces of the code from each other and gaining reuse. Using a module for your web app will help a lot with that.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: CGI::Application - why?
by gunzip (Pilgrim) on May 15, 2006 at 02:43 UTC | |
by perrin (Chancellor) on May 15, 2006 at 16:56 UTC | |
by friedo (Prior) on May 15, 2006 at 03:57 UTC | |
by DrHyde (Prior) on May 15, 2006 at 10:09 UTC | |
by jdtoronto (Prior) on May 16, 2006 at 03:44 UTC | |
by santonegro (Scribe) on May 15, 2006 at 20:31 UTC | |
by dragonchild (Archbishop) on May 15, 2006 at 13:00 UTC |
In Section
Seekers of Perl Wisdom