|laziness, impatience, and hubris|
Re: What is the Perl Web Framework du jour?by mr_mischief (Prior)
|on Mar 26, 2009 at 14:47 UTC||Need Help??|
This is just a small list. See this Perl 5 Web Frameworks Wiki and even more references at the sites listed below (often to even lesser-known frameworks) for more information. All of these should handle sessions, and I know most of them have some Ajax-y support. Those that don't can mostly be teamed with CGI::Ajax, HTML::Prototype::JS, JQuery, Google::AJAX::Library, HTML::Dojo, or other Ajax modules.
As mirod says, there's Catalyst (http://dev.catalystframework.org/wiki/), which by all accounts is a modern Web framework. It happens to follow the popular MVC model. There are also others to look at if Catalyst doesn't tickle your fancy.
Then there's HTML::Mason (http://masonbook.com/), which allows a bit of a PHP feel if you like that sort of thing, but with the power of Perl. It's been called mostly a template framework with some other web-aware pieces, but big web applications have been written using it. It can be used as just the templating part and even inside another framework.
I hear more and more about the Mojo web framework framework and one of the sample frameworks for it called Mojolicious (http://mojolicious.org/) as time goes by. I'm guessing that means it's gaining popularity at least with a few anecdotal groups. The website says Mojo focuses on a clean object orientated API, code generation, supporting the creation of more specific web frameworks, and the ability to run under lots of constraints. It offers its own HTTP server, runs under CGI with another server, or runs as FastCGI*. Mojolicious is an MVC framework built on top of Mojo as a fully functional working example.
Maypole (http://maypole.perl.org/) is another MVC, this time similar to the Java framework Struts. A main focus is to give an easy path from web page to a database and back to the web page. The authors claim it is able to provide a fully featured interface to a database in under 20 lines of code your custom code, yet still be flexible enough to handle everything else a web site needs.
I don't hear much about Gantry (http://www.usegantry.org/) on PerlMonks, but it has an impressive checklist of features. It offers built-in CRUD support, explicitly supports user authentication and sessions, performs code generation, has a plugin architecture (and a number of plugins ready to go), generates and validates forms, it has a self-contained mode (including using HTML::Server::Simple to serve the application on your local machine) for rapid local development, and even that supports three different databases (PostgreSQL, MySQL, and SQLite). It runs under CGI, mod_perl, or FastCGI*. You really need to see the 3-minute movie of the application and database generation, updates, and testing that's featured on the homepage before you make a decision about a framework. It has a little bit of a minilanguage of its own on the command line, but a simple multi-table CRUD database interface can be written entirely in one command line.
There's CGI::Application (http://cgi-app.org/), which as the name implies is meant to support applications running on the Web. It is mostly a
One of the frameworks derived from CGI::Application is Titanium, which is basically CGI::Application and a standard set of plugins and a bit of interface around it all. It offers lazy loading of its plugins. It runs under CGI, FastCGI*, or mod_perl.
Combust (http://combust.develooper.com/) is an MVC web framework and CMS rolled into one, with Subversion support for documents, a caching mechanism, and automatic POD to HTML conversion and formatting. It's used at http://perl.org and it sounds handy to any Perl programmer for some of those features. I hear it has rough docs, though, including from the CGI::Application website.
There are probably a number of these (if not all of them) that can support your site development well. Some of those listed are quite popular while some are more obscure. I've tried to make a note of my understanding of the place of each in the community as well as in the scheme of features and style of use. I haven't used most of them for serious work, though, so you might want to follow up with questions to the Monastery about the ones you find interesting.
* FastCGI is a popular cross-language standard for persistent web programs that under Apache uses mod_fastcgi. There are also FastCGI implementations for many other web server packages. FastCGI programs run separately from the web server and talk to it over sockets. Some, but not all, web hosting providers are more willing to install FastCGI than mod_perl.
** Updated as per discussion with perrin. I'm convinced I placed the wrong focus on CGI::Application the first time around.