Ajax - not to be used for everything - Monday 28th March 05
Ajax seems to be causing quite a stir at the moment. While I have nothing against the use of XMLHTTPRequest for making some very cool applications. However, like lots of people I am concerned that some people are using this 'new' technology in the wrong way. When building an application it is wrong to (like gmail) build the cool dynamic backend before you have built the stable backward compatible backend. You should start with that and then work with it as a base to build off. Also you should know what is a good use of it and what is a bad use.
Why are login forms a bad use of XMLHTTPRequest?
If you are using a modern browser, it is likely to have some sort of password remembering function. This is good for people like me that have accounts for many things all over the internet. It would be very stupid of me to use the same password for everything and we all know that. So I have many different passwords. If I need any password I can usually find out what it is. However, it is nice to be able to go around the internet without having to re-type my passwords every time I re-visit a site. This wouldn't be a problem for your average user as they like good little people store their cookies on their computer forever more. However, I delete all of my cookies whenever I leave the internet. So when I use a service that uses dynamic scripting to log me in, it just screams at me to not use that service.
Good uses of XMLHTTPRequest?
A good use of XMLHTTPRequest is that it requests small sections of large pages at once. For example: Large folder trees - having to load all the data for a larger tree can be heavy. Splitting it up in to small requests when needed is good.
So please don't just use this 'new' technology so you can jump on the bandwagon. That said happy coding :)