In preparation for doing the Protest.net re-write I’m doing some research on web frameworks. I find myself rewriting the same central dispatcher code, adding refinements, like a redirect method (similiar to the forward() method in servlets) and in general missing some of the refinements of Java’s web environments (servlets, Struts, bundles for i18n) while refusing to give up Perl, CPAN, and Template Toolkit.

This is my brain dump so far. Lots of questions, a few answers. The next step will be firing up the text editor and looking under the hood.

Steal from the Best

Applications I’m going to examine for ideas to steal, particularily framework ideas (error handling, inner loop, etc.) - Moveable Type – in my few glaces at the code its seemed intelligent, and well structured. Runs under mod_perl and CGI, handles some complex UI demands like pages that use redirects to update progress bars, and re-entrant forms.

  • Bricolage – based on Mason, I’ve been hearing good things about this CMS, particular about its clever Burnersabstraction, hope to find other good things under the hood. Don’t really know much about Mason, not sure if that is going to be barrier
  • RT – popular, mod_perl and Mason, ticket tracking software. Also supports email, and command line interfaces.
  • Scoop – haven’t looked at Scoop in a while, but I remember it seemed well done (having just come from looking at Slashcode 1.0), I wonder if it will stand the test of time. Not expecting to find anything all that relevant, but maybe. Will probably do a quick skim of the CMS parade: Slash, Everything2, and maybe LiveJournal. Definitely want to look at LiveJournal’s embedding instructions.
  • ?? Do you any Perl web applications you would consider examples of best practices??

Perl Frameworks

  • OpenInteract seems popular, and uses TT2, but leaves me cold, partially because I’m just not crazy about persistence layers. But I should probably spend some time looking at it. ?? Any expirences using it ??
  • Mason natively uses an embedded, page based execution model, which seems PHP-like to me, but Design Issues with Mason: What are Components For? seems to be simple guidelines for avoiding the siren calls. There is an Oreilly book coming out on it, which will be available online, but the author says, don’t expect it until mid-October.
  • Wombat is billed as an implementation of the Servlet API in Perl, but I can find exactly zero reference to anyone using it, never a good sign.
  • AxKit is a web framework built along the lines of Cocoon. I bet there are seriously cool ideas to steal in there, but I’ve been burned pretty badly playing with XSLT and don’t want to go back into that water right now.
  • OpenFrame also seems interesting. It has the request and response objects ala servlets, and acme is being paid to work on it, and it has a “Slot” concept which seems similiar to Brico’s Burner concept, and supports TT2. However it bills itself as an “open source application framework for distributed media applications.” Which isn’t really what we are building.
  • A few others are listed at Application Servers and Toolkits based on modperl. Also, Web Frameworks and their Template Engines is interesting.
  • Last time I was looking at this stuff there was JellyBean, which no longer seems maintained, and Iadio, which no longer exists.
  • I found a simple home-rolled framework that feels simliar to the one I did for Rockwood. It was mentioned in this interesting thread.
  • The book, Perl for the Web from New Riders, is freely available online and seems interesting if out of date.

Piecemealing with Modules

UPDATE: After looking at the available options, and at Struts 1.1, I would go with Java if I didn’t know I would have an insurrection on my hands.