Tom Insam

XMLHTTPRequest

The more I play with XMLHTTPRequest, the more I'm convinced it'll be one of the biggest things to happen to the web in 10 years. The possiblities for utterly changing the way web interfaces work is astounding. It's aquiring the name Ajax, which annoys me, but it is easier to say than 'XMLHTTPRequest'. It's also hard to code using it - because everything has to be asyncronous, you're playing with some fairly different ways of programming. It feels similar to the change you get going from simple command-line or server apps to GUI apps with their callbacks, except moreso - you're getting callbacks from the user interacting with the web page, and callbacks from the requests you've made to the server side in the past. When someone comes up with a decent toolkit for writing this nicely, I'll be a happy person.

I now have a mostly-written framework in JS for making calls to a server in a known RESTian format, and getting XML back in another expected format, so I can hide lots of the details and treat it almost like async XMLRPC, but I'd forgotten how annoying JS is to program in. It's not a matter of 'develop on firefox, and it mostly works on other things', like CSS, you virtually have to develop simultaneously on three platforms to stand a chance. I've lent a friend my rhino, so I have to use the web to look everything up, and there are no decent web resources for this stuff. The best thing I've found so far is the Gecko DOM reference, but there's nothing on the language proper - when you're routinely playing in perl, python and php, remembering what todays syntax for iterating over the keys of a hash is is hard. I tend to just try things at random till it works, or crib from random downloaded snippets that seem to work. This doesn't make the cross-platform thing any easier, either.. :-)