« Game-life Balance | Main | Robert Duffy should write more »

Now with Ajax! (Tagliner is born)

Yep. I, too, have followed the siren call of superfluous interface effects.

If you visit the site, SoldierAnt.net (c'mon you feed-readers: fire up that browser and come check it out), you'll notice that I've added a dynamic tagline at the top of the page. (Right now, it appears on the main index page only -- I'll soon add it as a standard part of the header for all archives pages as well.) At first glance, the effect isn't that spectacular: it basically looks a lot like my static tagline that I used to updated on a semi-frequent basis.

But for a long time now, I've wanted the ability to update the site's tagline in an easier fashion. It's always come from Movable Type's MTBlogDescription template tag. The blog description is set under 'Configure > Settings' in the MT control panel. To be honest, it's not that tedious to get in there and change it from time to time, but I really wanted some way to keep track of past taglines. I played around just setting up a separate blog to hold them but for some reason that felt kinda dirty -- to keep a ~12 or 13-field MT blog around when all I wanted was 4 lousy fields. (I'm only using 2 of the fields right now, but have plans for the other two.)

When I was in California last week Lance mentioned that he got a mild kick out of my rotating taglines. (He said he sometimes looks them up to get the references.) Which further convinced me that I'd like to save some of my greatest hits from the past, and perhaps do something clever with them: swap them out randomly, or allow visitors to browse all of them.

So, long story short, I built a little Rails app that's custom-tailored to permit just that: it accepts tagline submissions from me (with a simple input form - none of the extra overhead of my previous MT-hack version) and stuffs 'em in a database.

Then I use the Yahoo UI library's Connection Manager to dynamically pull the taglines into the rendered page. With the Web2.0-ubiquitous spinner.gif to make it look all tricky and shit.

The easiest part, by far, of the whole process was building the Rails backend. I had a working version running in (seriously) no time. I just kept my copy of Agile Web Development With Rails cracked open at my elbow and ran through the first 4 or 5 steps of building the sample 'depot' app, changing the steps to suit my needs. (Remember, 4 database fields, and one of those is the Rails' convention id field.) I had the simple tagliner app running in about 20 minutes, and that was mostly due to my usual fumbling with Mysql (forgetting my admin password, fat-fingering a couple commands....)

I had slightly more trouble in trying to get the YUI Connection Mgr examples to work. Partially this was because of a bug that I uncovered with the examples that ship with the Library. But it was mostly due to my totally creaky skills with javascript (and my practically non-existent experience w/DOM scripting.)

Oh, and -- although the Rails development was the picture of simplicity, I wish I could say the same thing about deploying my finished app to Dreamhost, where Soldier Ant is hosted.

Actually, big ups to DH -- at least they do host rails stuff, and they've got some fairly comprehensive instructions on their wiki. But even with all the handholding, it took a while and a couple of silly missteps on my part. (Including one seriously stupid couple of minutes where I unknowingly dumped my whole app -- database configuration files with plaintext passwords and all -- into a world-readable section of the site.) Ah well, nothing is proof against fools...

Anyway, now it's done. It's a teensy, tiny little feature of a teensy, tiny, mostly-overlooked blog. But I'm pretty happy with it. And I've got some small plans for it in the immediate future. Like I said, I'm gonna add the functionality to every page on the site (as a Movable Type Template Module) and then I'm gonna play with the underlying display a little bit.

Right now, it just always displays the latest tagline that I've entered. I'd like to get it to pull a random tagline every time it loads. Or perhaps display a random one only after you click on it. And I definitely want to add a 'browse' view so you can see all my past taglines (and, for the truly bored, perhaps even subscribe to an RSS feed to see when I add new ones.)

Oh, and I would feel remiss if I didn't mention that a big inspiration for all of this was a feature that used to be in the internal Netscape bugtraq system (the precursor to the open-source Bugzilla. Used'ta'be, when you did a bug search, that you'd get a random quote provided by any one of hundreds of netscape developers. You could click on that quote to get the full list of all quotes, and.. of course.. provide one of your own.

You can imagine the typical quotes that would appear: UNIX humor, Star Trek references, "Buehler? Buehler?'- type of stuff. But it was great fun, and - dare I say it - an early example of social software features that helped humanize something that can otherwise be a fairly cold and technical act: filing a bug report (or following up on one.)

I'm kinda bummed to see it, but it doesn't look like the quote feature has survived into the bugzilla era.

So, that's kinda how I look at my site's tagline. Strangely, I think that the goofy, pithy things I choose to feature there say more about me than the bulk of the entries that I author. I think taglines are the poo.

So take a big whiff.

Comments (1)

dave [TypeKey Profile Page]:

I was just playing with that tagline. Shit, there's more to it than meets the eye. That's one sophisticated operation. Cool though.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About

This page contains a single entry from the blog posted on October 21, 2006 2:40 AM.

The previous post in this blog was Game-life Balance.

The next post in this blog is Robert Duffy should write more.

Many more can be found on the main index page or by looking through the archives.

Syndication

Subscribe to feed Subscribe to my feed
Powered by FeedBurner
Creative Commons License
This weblog is licensed under a Creative Commons License.
Powered by
Movable Type 3.33