Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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


In reply to Re: Why CGI::Application? by derby
in thread Why CGI::Application? by sdbarker

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (7)
As of 2024-04-19 08:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found