Uncategorized

Sniffing the Ajax

A new web technology is tickling my antennae. I hardly know enough about Ajax (bit WikiPedia does) to write about it. In my nutshell, it allows you to create interactive web pages or web pages with navigation that can change content within the page without doing a fresh HTTP request (a.k.a loading a new URL) in the browser.

In the webspace, there is an over dominance of web sites (think online shopping, your course management system) that involve a series of web forms that are filled out, submitted, another page of forms appears that must be filled out, submitted, etc. It gets rather tedious for all those server transactions, and on a user experience end, it interrupts the thought process, or we have gotten so used to it, we expect to be interrupted.

Something like Ajax and the in page editing tools of flickr can be the signposts for the next stage in how we interact with web content, which may not be s series of click submit wait click submit wait. I am getting a good feeling about what AJAX offers– even if the slashdot club cries about if “being nothing new”— who gives a hoot about who did it first? The point is to do something interesting/useful with aq technology, not pee on the ground to say “I did it first”.

So, I’m sniffing a bit more. Read on…

Ajax marries JavaScript for the in page coding with a method of JS functions that can send and process XML requests via HTTP, get content, and load it in the same web page. I got a whiff of this in Kotke’s post on Ajax and Weblogs where his main blog page now dispenses with the extra clicks and hunting among archive pages to provide the functionality via a front page drop down menu. When you select an item from this menu, the browser never leaves the page (e.g. the URL remains the same), but new content is dynamically loaded.

Again, this is a different experience from (reach back and remember how many click and loads it takes to order something from an e-commerce site or what it takes to edit a page in your course management system) “enter form-submit request-wait for server – enter more stuff – click submit – wait for the server” – …. lather, rinse, repeat).

A very understandable mini tutorial is provided via Guide to Using XMLHttpRequest (with Baby Steps) from WebPasties with an illustrated example of filling out a form where you enter a US zip code and the AJAX way automatically looks up the zipcode and populates a city/state form fields from a database request, without leaving the web form. It sounds trivial, but extending this to the endless series of web forms we click through on a regular basis, it is a breath of resh air.

I am toying with using this for our online event registration. Currently I have a well working collection of PHP scripts that process the registrations, move registrants to a waiting list once a cap has been reached, generates individualized emails to all registrants, and provides planners a dynamic tool to look up current RSVPs. As it stands it is rather low tech; the “database” is a flat text file for each event. This year, I set up more than 25 of these, and while it is not too much trouble, it is tedious, but there is another twist.

I am thinking of moving it all to one RSVP database to better manage the data (as well as generate reports), and I was thinking of setting it up so that once you registered for one of our events, we would track your information (name, email, college, discipline etc) in a user table, so if you came to register for a second event, once you entered your email address, we could populate the rest of the form with the same info from your last RSVP.

This would be a natch for what AJAX does. I think.

Profile Picture for Alan Levine aka CogDog
An early 90s builder of the web and blogging Alan Levine barks at CogDogBlog.com on web storytelling (#ds106 #4life), photography, bending WordPress, and serendipity in the infinite internet river. He thinks it's weird to write about himself in the third person.

Comments

  1. Some of the APOLLO/Pachyderm prototypes that King whipped up (a year ago?) would absolutely blow your mind – using “AJAX” to provide what feels just like a “real” application experience. We had to step waaaay back from that, but it’s on the roadmap for post-2.0 pachyderm development…

Comments are closed.