Powazek
Powazek
Thoughts about Ajax

Ajax, Ajax Everywhere
Just a thought from 11 May 2005 about , , .

In February 2005, Adaptive Path published an essay called "Ajax: A New Approach to Web Applications" by Jesse James Garrett. This week I got to participate in an Ajax Summit sponsored by Adaptive Path and O'Reilly. Yes, there were just three months in between the naming and the first conference. That's fast even at internet speeds.

What's Ajax? For the geeks, it's Asynchronous JavaScript + XML. For the rest of us, it's a whole new way of looking at the web. Really.

You know how the web works, right? You click a link in a browser and your computer says, "hey server, send me this page." And the server says, "sure, here ya go." And you see the page. Click, rinse, repeat.

Ajax, and the pile of techniques and technologies that get lumped in with it, are all about breaking that page-by-page web experience into smaller chunks. If the traditional web was letter writing, Ajax is instant messaging.

dmp on ajax
This is me doing what I did most at the Ajax Summit: Listen. Photo by the talented mister Tim Gasperak (more here).

Right about here is when the inevitable example of Google Maps comes up. And for good reason. It's just so darn cool to click and zoom around. But it obscures what Ajax is really about. It's like using a race car to explain what an engine is. It's in there, sure, but wow look at it go!

The more compelling examples are the smaller ones. If you're a Flickr user, and you've ever clicked on a photo title to edit it, that's Ajax. Or explore Dunstan Orchard's fabulous LiveSearch, which presents search results as you type. Or explore any of the new web apps from 37 Signals. Ajax, Ajax everywhere.

Put simply, Ajax lets web pages to go back to the server for updates in between page refreshes. Before, once you got the page, you were done. But now, with Ajax, the page can respond with server smarts as you interact with it.

Perhaps a concrete example would help.

Tell me if this sounds familiar: You're signing up for a membership at a website. You enter a username, password, password confirmation, URL, and an email address. Pretty simple, right?

Except the username you picked was taken. What happens? The entire page is submitted to the server, the server says "no way dude" and the entire page is sent back to you with an error statement. All you can do is change the username and submit it again. And again. And again.

And when you finally pick a username that's available, you realize you flubbed your email address. Fix that, but you forgot the email confirmation. Fix that and you realize you forgot the @ in your email address.

Each time you submit the form it goes all the way to the server and all the way back. It's frustrating for you, taxing to the server, clogging for the network. There has to be a better way.

With Ajax, as soon as you enter that username, the page checks with the server to see if it's available. The page can even make the related fields active only when the username comes back okay. It does this with simple, background server requests that send small data fragments back and forth, instead of the whole page. The page can then update to reflect that the data was accepted in real time.

This is just one boring example of the way Ajax can make websites easier to use. Data entry in web forms has always been an especially cruel thing to do to a user and a real point of failure for business applications. By progressively validating form contents as you go, and even adding entire sections only if they're needed, we can finally solve a long-standing interface nightmare.

On its own, Ajax is nothing more than a tool on a workbench. To use it well, it will take a lot of experimenting, a lot of conversation between designers and coders, and a lot of trial and error. There are problems to be solved with the interface (how will a user react to a form with no save button?) and with the technology (how can we support older browsers without a ton of extra work?) and with existing web conventions (how do I bookmark this?).

But none of those questions can get answered unless people sit in a room, or get together online, and ask them. There will be more gatherings and more blog posts. The work is just beginning.

The core takeaway for me is this: Stop thinking about the web in terms of pages that go from a server to a browser, and instead think of pages as collections of chunks that can each go to and from a server as needed. In many ways, it reminds me of the revolutionarily simple lesson from blogs: When you think of the web as posts instead of pages, important things happen. In the same way, thinking of the web as dynamic portions of pages opens up all sorts of user interface opportunities.

We web developers have an opportunity with Ajax to really improve the user experience on the web. And I, for one, can't wait.


More takeaways from the summit from Lane Becker and Scott Andrew and the Ajaxians.

Wha?
This section is called Just a Thought. It's a blog where I post little pieces of what I'm thinking about at the moment. This page shows thoughts about Ajax, including:

Ajax, Ajax Everywhere
11 May 2005

Join the POWlist
Enter your email address here so I can send an occasional note to your inbox. Only good things, I promise. More info »




The Fine Print

Working the web since 1995, Derek Powazek is the creator of many award-winning websites, a couple of which still exist. Derek is the cofounder of JPG Magazine and the CCO of 8020 Publishing. Derek lives in San Francisco with his wife, two nutty Chihuahuas, a grumpy cat, and a house full of plants named Fred. More »

Join the POWlist to receive the occasional note.

Previously

Thoughts by month:

Thoughts by subject:

Search with Technorati:

Search with Google:

In Print
My CaliforniaMy California
Contributor (Story)
We DoWe Do
Contributor (Photos)
Design for CommunityDesign for Community
Author (Tech)
San Francisco StoriesSan Francisco Stories
Author (Stories)
We've Got BlogWe've Got Blog
Contributor (Essay)