[cgiapp] Some general questions on CGI::App and OO web application design philosophy

Gurunandan R. Bhat guru at informationmatters.in
Sun Jun 7 05:35:07 EDT 2009


On Wed, 2009-05-06 at 21:47 -0400, Brad Van Sickle wrote:

> This isn't a technical question, so I hope I'm not misusing this list...
> 
> I just "discovered" CGI::App a few weeks ago, and I'm still pretty new 
> to writing web applications using a reusable, extendable OO framework.   
> I can clearly see it's a better way of doing things than chaining .cgi 
> scripts together, but I can't help but wonder if I'm not using 
> CGI::Application to it's full potential.


I hope the list will not mind me riding on the back of this question -
since it is something I have been thinking a lot about lately. Here are
a few numbered points in sequence:


     1. CA gives me the exact amount of freedom to do what I want. I
        love the fact that it gets out of the way exactly when I want it
        to. Which is why I have been reluctant to move to more  "mature"
        or "fully" MVC frameworks. Since HTML::Template too shares the
        same quality I like the bundle.  
     2. However this very quality - take whatever you want/understand
        and fill it up with your application logic -  means that most
        beginners (including me when I first started out) tend to use
        CGI::App simply as a dispatch engine, without using the full
        power of pre-run, post-run hooks, init, error handling etc.
     3. An interesting point (might be true in my case only) was that I
        understood the fact that - you could essentially use any object
        framework to implement your application logic (Moose, Class::DBI
        etc) and leave the CGI::App to only deal with the the general
        tasks common to all "web" application - only after a few months
        of playing with it and grokking the docs on the CGI::App wiki. I
        wish it had happened sooner, but its probably only me?


Given this, could someone more experienced than I, add thoughts/docs to
the wiki listing best practices of using/integrating other frameworks
(Moose, CDBI, DBIxC among others) for the "M" parts of the application?
I would be happy to expand a brief bulleted list and make a doc if
someone could help.

Regards



More information about the cgiapp mailing list