Posts tagged: WEB DEVELOPMENT

Framework de-flummoxing

Eric Meyer recently wrote a post titled “Flummoxed by Frameworks” that received a lot of commentary. I belatedly added my own two cents. I have a feeling that this isn’t the last time the subject will come up; I’m copying my own response here (along with the link to Eric’s post) mostly so that I can find it later when I want to explain this to somebody else!

Eric, you mention that you wrote all of An Event Apart’s registration stuff using PHP and MySQL. I take this to mean that you did it once. Imagine if you did it three times, or five times, or fifty times for different clients, with minor variations. Imagine how sick you’d be of re-implementing the same core features over and over. Your approach would change a little bit with each job, as you discovered better ways to implement certain features. Imagine the nightmare of trying to support all those clients each one using a slightly different snapshot of your learning process.

Django as superego

I built a toy site using Django’s “generic views” last night. Basically this means that for the first time I created an app without writing any real code – I defined a model, wrote some rules mapping URLs to Django’s generic view functions, and made some templates that get called by that view code (I spent most of my time fussing with the templates!).

This would have been pretty easy to hack up in PHP, too, but there are lots of things that would have been just as easy to not do the “right” way – things like clean URLs everywhere, redirect-after-POST (to avoid multiple submissions), custom error pages, a polished admin for inspecting and editing the data, nicely modular templates. Django made it easier to do it right than to do it wrong.

Offsite, online backup: rsync.net

This week at work we’ve been dealing with a hellish situation: our colocation provider (who will for now go unnamed) wiped out the live backup of one of our drives – then overwrote the drive with a seven-day-old tape backup. Nice going, guys! So now I’m digging through my “stashed-this-away-just-in-case” backups for missing data from the past week.

We’re switching to JohnCompanies.com for hosting – I’ve been using them for nearly three years for my own stuff (including this site), quite happily.

Dabble DB

I can’t remember the last time a software demo made me involuntarily say “holy crap” so many times. In a good way, I mean.

Dabble DB, in case you haven’t heard of it, is a browser-based database exploration/development tool. The interface alone is inspiringly clear, elegant, and rich. And then there’s what it actually does with the data. We’ve all done these things, but we’ve had to do them in much slower, more laborious ways.

Random crufty open source release of the day

Last year a client asked for help moving his website to a new host from XO.com. The tricky part was that his 200 pages of content were locked into an obsolescent proprietary tool called “Site Builder” that offered no exporting options. The file format was a flatfile that looked like this:

#Page-Type "html"
#UID "1000"
#Access-PublicRead "on"
#Access-PublicWrite "off"
#Page-Links-Style "links_outline.nhtml"
#addbrs "off"
#hidenav "off"
#HTML ...

The file structure went like this: a parent directory named nss-objects; child directories bearing page names (or slugs, really); and inside each, an empty directory named !data and a text file named !object with the page content as described above. Weird. (I suppose every proprietary one-off system is weird in its own way, so there’s nothing to be gained from dwelling on the specifics, but at least including them in the post raises the chances that somebody who actually needs this thing and searches for it will find it.)