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.

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.

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 !

Moving the blog to Django

The long-awaited (by me) conversion of this blog to Django is underway. After a couple hours’ work I have a full set of models and a functioning admin, and working index and detail views of postings and comments. Searching, posting comments, and tags are the major pieces remaining. Because of my busy schedule I’ll only be able to work on it in fits and starts, but I expect the total labor in the end to be about five hours.

PHP and view/controller separation

Ironic that I find myself defending PHP at a point when I’m making a huge effort to move most of my web coding to Python, but I keep running across mini-rants along the lines of “PHP sucks because it mixes business logic into your HTML.” No, it doesn’t. It makes it possible, sure. But it’s completely avoidable. As The Daily WTF can show you, it’s possible to do screwy things in any language.