Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Why CGI::Application?

by derby (Abbot)
on Jan 13, 2004 at 13:32 UTC ( #320948=note: print w/ replies, xml ) Need Help??


in reply to Why CGI::Application?

It seems as though all of the benefits of C::A are things that can be accomplished by simply adjusting your coding style; making more blocks of code into subroutines, etc.

Sure that will work.

Hey but wait, darnit, I want to use CGI::Simple instead of CGI ... better write that hook.

Hey but wait, darnit, I want to do some post-processing after the HTML is sent to the client ... better write that hook.

Hey but wait, darnit, I need to get into the process after reading the HTTP stream but before I do my real app stuff ... better write that hook.

Hey but wait, darnit, I need a hook after generating content but before sending the headers ... better write that hook.

Hey but wait, darnit, I need a hook to modify the headers ...

Hey but wait, darnit, I need a hook to override what step is being executed ...

Hey but wait ...

CGI::Application gives all this to me and it's been developed, reviewed and used by a slew of talented and qualified people. You see the authors have given you a framework that makes the easy things easy and the hard things possible. Sure you could do that yourself, but you could also write CGI.pm yourself or for that matter your own interpreter.

To me, CGI::Application did not add a layer of complexity and confusion but actually cleared up a lot of issues when trying to build MVC apps. I always knew templates were the VIEW and application specific modules were the MODEL ... it was that damn CONTROLLER that became a big hairy beast ... well CGI::Application really cleaned up my thought process when it came to MVC. So sure I could have spent weeks, months, years creating my own Application framework ... one that's easy to use for the straightforward cases but also allows me to hook in and change things on the fly or I could spend 15 minutes downloading CGI::Application.

So I say well done Jesse (and all the contributors).

-derby


Comment on Re: Why CGI::Application?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://320948]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2014-09-24 01:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (244 votes), past polls