Choosing a Perl web application framework

I’ve hacked up a few websites in my time but strangely, although Perl is my language of choice, never using Perl CGI. They’ve either been quick and dirty PHP scripts or else the Joomla CMS (PHP + MySQL) with Facile Forms.

This is about to change. I see a variety of web apps in my future work and they’ll require the Bioperl library. I’m also keen to start doing things properly – which means frameworks. A bit of web research has lead me to two alternatives:

I’ve read good things about both of them. Both are packaged for Ubuntu, so install should be straightforward. Catalyst seems to be “Ruby on Rails for Perl” and looks like somewhat more of a learning curve. I like the philosophy of CGI::Application: you package your web app as a module that codes the page(s) and call it with a simple wrapper script. The two options seem similar yet different. Opinions on the web don’t seem to favour one over the other and some people are happy to use both.

Choices, choices. Comments from any Perl heads with experience of these frameworks are most welcome.

3 thoughts on “Choosing a Perl web application framework

  1. Dotan

    I used CGI::Prototype, which is the framework equivalent of a bunch of chainsaws tied together with a short piece of string – a super-minimalist module that brings together Template-toolkit, Class::Prototyped, CGI.pm (and works nicely with Class::DBI or whatever else you choose to add). The main thing I found missing was structure (CGI::Prototype::Hidden adds a tiny bit of it, but only a tiny bit) – the idea is that each page is represented by a template file and a module file, and there’s a simple control flow in which your base class dispatches the request to a relevant sub-class, which can invoke a different sub-class etc.

    This all works fine with the standard “login page” example, but real examples (and even visible online users of the module…) are pretty thin on the ground, so I never felt very confident or happy with the ad-hoc way I designed my application, which has what I imagine is a very standard sort of flow (search -> results list -> detailed gene report) structure.

  2. Rodney

    HTML::Mason beats them all hands down IMO. In use by some of the largest sites on the internet. Full control over all aspects of secutity, templating, bind that to your own logic modules, you have a winning combination that scales.

Comments are closed.