08 August, 2005

AJAX

The point of Ajax is quite simple, but no-one else seems to have noticed. Basically the difficulty with web development is that HTTP is stateless. The server processor (whether ASP, ASP.NET, PHP, JSP or whatever) then adds in a ton of kludges trying to add scalable state on the top of a stateless protocol.

If you are writing a desktop application, with a five page wizard, you store all selected values within the form/window/wizard/dialogue, until the user clicks the "Finish" button when it is posted en masse to the server. With traditional web programming, each pane in the wizard is a new page request - the state has to be carried up and down the pipe for each page request. But with AJAX, that wizard can be a single page request - the state can be stored as java script objects within that page and the each pane stored as separate "div" tags that are shown or hidden as required. Hence the state is stored on the client - meaning that it is scalable and there needs to be no changes to HTTP to make it work.

Note that none of what I have written above is in any way condoning the use of wizards within user interfaces.

No comments:

Archive

eXTReMe Tracker