« September 2004 | Main | March 2005 »

26 February 2005

Cleaning TypeKey With Some Ajax

I couldn't help but notice a bit of a delay in loading this site's entry pages ... like this one. Go ahead, load the complete entry and keep your eye on the "Post a comment" part (or even the sidebar, whichever is in view).

Seems to pause midway for a few seconds, doesn't it? Actually, it depends, but sometimes I've seen it take as long as five seconds. I don't know about you, but that's almost five seconds too long in my book.

What's up with that? It appears to be the Movable Type Comments CGI fetching the TypeKey signin status mid-page, that's what's up. Sure, I could get rid of TypeKey support ... but I've got nothing against TypeKey. I'd rather just get rid of the delay. What to do?

Sounds like a job for some Ajax!

The technique has actually been around for a while, but is only recently making some serious waves thanks in no small part to Google Suggest and Google Maps and who knows what else by now.

The term Ajax was coined by the fine folks over at Adaptive Path. It's short for "Asynchronous JavaScript + XML"* - and AP founder Jesse James Garrett took the time to craft a rather lucid explanation of what it's all about. If this is all news to you, and you're the least bit interested in client-side scripting, by all means do yourself a favor and read the essay, stat. (<Australian accent>: "It'll change your life." Hmm, can't seem to remember where I first heard that - oh well ...)

Back to TypeKey. I thought this would make a good candidate for a few reasons. One, the signin status already uses client-side scripting. Two, the aforementioned delay. Three, it's something new to explore (aka "because I can").

So here it is, straight from the sandbox, my first at-bat using Ajax with Typekey. My head's already spinning with several next steps for improvement, both for this specific application and the XML HTTP request library in general (creative use of anonymous functions, anyone?). Nevermind that for now - you have to start somewhere. Enjoy.

* As for me, I tend to call it ECMAScript, not JavaScript. Then again ... hmm, Aecx? (Right - Ajax it is.)

21 February 2005

The Ever-Popular Technorati'ed Artist Effect

To the Internet Explorer browsing audience: Mea culpa! The "defer" attribute snuck in to a Technorati link in the sidebar ... which, when viewed in IE led to the wholesale rewrite of every page with a rather plain link to my Technorati Profile (which, in fact, isn't much of a profile at all - odd, that).

Anyhoo, a big thank-you to Holly for pointing that one out. It's fixed now. Carry on!

So Many Plugins, So Little Time

At long last, I'm getting the interior decorating bug. Surely a bit of paint, some carefully-chosen furniture and a few well-placed knick knacks could help liven up the place a bit. Besides, you can only go so far with a futon and orange highlights.

Thus far, I have selected the following hand-crafted Movable Type Plugins:

"C'mon, Joe, surely you can do better than that! Have you seen Ben Hammersley's plugin list lately?" Of course it's not about who has the most plugins, it's how you use them that counts. Besides, I have to believe Ben had a good reason for picking each one. (Otherwise he'd be setting a dangerous ... um ... you know.)

So let's hear from all you MT Plugin connoisseurs out there: If you could take only three plugins with you to a desert island, which would they be and why?

13 February 2005

www.att.com home page redux

The AT&T home page adopted a brandy-new look this weekend. It's still valid XHTML/CSS, just as before. This time around we've revisited the print media style plus added handheld media style. (Finally, I can view the page on my PDA without scrolling horizontally!)

UPDATE: www.att.com has begun to officially change hands, starting with the home page. Read all about it.

The new design (which I can't take credit for - I'm only guilty as charged for the XHTML, CSS and JavaScript) sports a fixed-size feature that's flanked by cells of text along the right/bottom sides and lower-right corner. The challenge posed to myself and partner-in-crime Vincent Murphy: Create a page that's true to the comp yet built with standards-friendly, accessible, and semantically meaningful XHTML, CSS and JavaScript behind the scenes.

All in all, I'm quite pleased with how it turned out. There will be the inevitable touch-ups (and occasional refactorings) but it is extremely close to the comp, if not spot-on:

  • In the spirit of accessibility we kept all the text scalable. Alas, this breaks the layout up a bit when increasing the font size <!>. I'm hopeful we'll find a way to tackle the scaling more gracefully, probably using a variation of Pixy's 3-column layout technique (which we're already using across the rest of the site).

  • I expect we'll do something with the three promos to the right of the feature (read: "make the text a bit bigger and relatively easier to read").

  • While I didn't get a round tuit this time, I'm still quite eager to completely divorce the last bits of JavaScript from the XHTML. (Why just separate content and presentation, right? Get page behaviors in on the act too!) We already do this elsewhere on the site, for instance with the "highlight" class as applied to our Access Keys table - no need for onhover in the markup.

  • Worthy of extra-special mention are GreyWyvern's min-height hack and Dan Cederholm's Mountaintop Corners technique; both are featured rather prominently.

  • There's lots more in the CSS and JavaScript from the likes of Holly Bergevin, Caio Chassot, probably a few others I'm not recalling at the moment. (Wait - need I mention Eric Meyer and the css-discuss list where I happily lurk on a semi-daily basis? But of course!)

  • While expected appearances by RSS and sIFR 2.0 RC3 didn't make the cut ("awwww ..."), I'm sure there will be plenty of opportunity to finish tackling both of 'em going forward ("... yay!").

Every time I write a new kind of standards-based page, it winds up being a learning experience well worth the time and effort invested, many times over, no matter what hurdles I encounter along the way. With that, I offer stupendously huge thanks to everyone who had a hand - directly, indirectly or even unknowingly - in making this latest revision possible.