pmas has asked for the wisdom of the Perl Monks concerning the following question:

I was contemplating to use some CGI framework to simplify our CGI development and make it more straightforward, and was thinking about CGI::Application. I noticed that couple of monks are using it. So I was intrigued when boo_radley said s/he find some problems/limitations in it, in node Refining the CGI process through structure and templates.

boo_radley, can you share with us what problems/limitations you found? Did you tried to resolve them in cgi-app mail-list? What were answers from wise men?

My question is not intendeded to judge boo_radley's decision to develop own framework (I even like to try it in spare time). I just wanted to know what limitations/catches in CGI::App I did not noticed, so I can learn from experience of others and avoid problems what I cannot see now.

I am also hoping other users can give some real-life experience: what to expect, what to be aware of, which submerged boulders to avoid.

I am aware of Mason, but I prefer CGI::App/HTML::Template approach where perl is in one bunch of files (related functions in one module), HTML is in another, and they are not mixed up.

pmas
To make errors is human. But to make million errors per second, you need a computer.

  • Comment on What is your experience with CGI::Application?

Replies are listed 'Best First'.
Re: What is your experience with CGI::Application?
by Hero Zzyzzx (Curate) on Aug 14, 2001 at 18:56 UTC

    While I'm certainly not the perl hacker that boo_radley is, my experience with CGI::Application has been nothing but good. The fact that it necessitates using good coding style (OOP, avoidance of globals, etc.) and integrates tightly with HTML::Template is certainly a boon, and the fact that it works beautifully with mod_perl.

    I must admit that CGI::Application is really where I cut my OOP teeth, and I must say I think it was a good way to start.

    CGI::Application doesn't do anything you couldn't do yourself, per se, but I find the way it makes me think about application development to be invaluable- centralize code that should be, keep HTML out of perl, and think of your application as discreet pieces (runmodes). Also, a CGI::Application module is very readable, and hopefully maintainable down the road.

    One last thing- the mailing maintained by Jesse Erlbaum is very responsive, and Jesse responds to issues quickly, without trying to make CGI::Application a bloated, unfocused mess.

    CGI::Application rocks. Try it out for a smallish project, and see what you think. I'm using it for both smallish and largish projects, and it's been great for both.

    -Any sufficiently advanced technology is
    indistinguishable from doubletalk.

Re: What is your experience with CGI::Application?
by larsen (Parson) on Aug 14, 2001 at 19:26 UTC
    I pointed out some consideration on the CGI::Application model in another thread (Scaling single-script CGI applications).

    I don't know boo_radley's projects, but I'm considering to develop a way to automatize writing CGI application. Something that you can feed with a graph-ical description of the processes of the application (i.e.: from this screen to this one, passing these variables... and so on), and that produces Perl code to fill where it's necessary. Just a thought, at the moment.

CGI::Application, a real-world example
by markjugg (Curate) on Aug 14, 2001 at 19:50 UTC
    I've got a real world example of a CGI::Application based project you can try out. In summary, I converted a moderate sized application to use CGI::Application and I've been very happy with as an organization tool and framework. I would consider using it for all but the most trivial CGI projects. You can visit the Cascade homepage to read more about the software, demo it and download it.

    -mark

      Hi, is the admin page dead? Tried to see it but "Page not found"
        This bug is now fixed.

        -mark