Posted on December 16, 2008 at 6:16pm EST. More.

I hereby invent PROSAIC web architecture

I’ve proud of the Fat Penguin website. No doubt it could use some graphic design love, but the content is great: a record of our every appearance and the suggestion given to us for each show. I’ve been updating it by hand ever since I set it up a year ago; as time has gone by my labor of love began to feel more heavy on the labor and less on the love.

Now, a list of shows is a perfect fit for a database, but the prospect of setting up a MySQL database seemed to be more hassle than it was worth. I keep files destined for my web host’s public_html directory in a Subversion repository. I edit and preview locally, and when everything is looking good, I commit the changes. To update the site, I run a shell script that exports the entire repository to a RAM disk and uses rsync to push changed files to the web server. Easy as pie!

If I set up a MySQL database on the server, I’d have to set up another one on my local computer and keep them in sync. I’d also have to create an admin interface so I could update the database. And I’d have to add some kind of authentication to make sure we don’t get punk’d by members of Bad Data, Thank You, Robot, or The Stamp and Coin Club. Who needs it?

Recently, a few things have come together which made me realize there is a better way:

Now I use Base to maintain a shows.db file with all of our show information in it. That file gets checked into Subversion just like everything else. The pages use PDO to query that database and display our Upcoming Shows and our Past Shows. Our home page will no longer ask you to come to a show that took place a week ago. Now I can even consider enhancements like a iCal feed.

I think this a great system for sites with content that could benefit from some “dynamism” but don’t need a full blown content management system. I’m pretty sure if I lived in California I would give this a name like PROSAIC (for “PHP, Read-Only SQLite, And Intellectual Challenge”) and start booking speaking engagements.