On Not Reinventing the Wheel

May 12, 2009 at 12:07 am

Last year I wrote a Catalyst-based application to manage the workflow for the team of reporters, editors, and publishers providing web reporting for the the annual Unitarian Universalist General Assembly.  This includes tracking each event at GA, assigning reporters, photographers, videographers, and managing the writing/editing/publishing workflow for each article to be posted on the GA website.

I didn’t know about DBIx::Class::InflateColumn::File at the time, so I wrote my own system using Catalyst::Model::File to store the uploaded files.  It was a mild pain in the ass to deal with the files separately from the DB model, but it worked and got the job done.

Lately, I’ve been working on another application that requires uploading and storing files:  a discussion paper archive and search system for the Department of Statistical Science at Duke University.  Again, I was struggling with using Catalyst::Model::File to store the uploaded manuscripts and associated data files.  I don’t like using C::M::File because it breaks the model paradigm.  I’d rather put all the data for each discussion paper in the DBIx::Class based DB model I built.  I’m thinking of writing some command line utility scripts for the archive and using C::M::File binds me to Catalyst in ways I don’t want.  So I went looking.

I saw discussion of DBIx::Class::InflateColumn::FS on the Catalyst mailing list and started investigating it.  Then I found DBIx::Class::InflateColumn::File.  Both provide the filesystem-based storage of files tied into my DB model I need, but I’m going to use InflateColumn::File.  It fits my needs better and lets me serve up the files using Static::Simple in a straightforward manner.

I love the CPAN!  It gave me not one, but two!, good alternatives to Catalyst::Model::File, and I don’t have to write it.   I only wish I’d noticed InflateColumn::File last year.

Categories: General Assembly, Perl

Tags: , Leave a comment

Leave a comment

Feed

http://rambles.bearcircle.net / On Not Reinventing the Wheel