Thoughts on AJAX
September 7th, 2006 in web development | 2 Comments
I’ve done a bit of work with AJAX, usually just for fun, but I think I know enough to talk about it. I’m sure you all know what it does by now, so I don’t need to explain that (here’s a link in case you don’t). I’ll just move on to how I use it.
When I first started using AJAX, I wrote my own functions for it from the ground up. After rewriting them everytime I started a new project I thought it was time to find a good library. I looked around a bit, found Protoype unsuitable, and finally landed upon AjaxRequest. It wasn’t too bloated and seemed to have nice features. What I was really after was the form serialzation, which Prototype has. AjaxRequest has a similar function, but much smaller file size. I think I can get it down to about 8k by removing the comments vs Prototype’s massive 40k. Sure Prototype does other things, but I like to stay small. (I also recently discovered this.)
Another area of interest concerning AJAX is the emergence of JSON, an alternative to XML. It’s native to Javascript and a couple other languages so it has the benefit of speed. But it’s not native to PHP and has to be translated, which takes more time than translating XML so I don’t use it for AJAX. It might help you program better Javascript, though. Really it depends on the situation. You can’t always use JSON, and you can’t always use XML.
Well that’s all for now. I’ve got to get to my Flash/AJAX(!) course.

Hi, I'm Chris, a passionate freelance web developer. My languages of choice are PHP and JavaScript, and that's what you'll mostly find in my blog. You'll also find updates about 