# AJAX Rocks…

Ajax, Development @ 22 October 2005

Ajax is damn cool.

I am currently working on a small project using Google Maps which displays properties on a map. There is a central object which manages communication (via googles GXmlHttp) with the servers-side php. Upon response, this same object parses the response XML and then updates its observers.

Each component then has an object which manages its display, it subscribes to the main object, and upon update will redraw that elements innerHTML, mostly by transfrorming the responseXML with XSLT using googles GXslt class).

This got me thinking about a component base widget framework implemented in javascript, something that a server side application could easily communicate with. Imagine something like awt/swing being rendered to a javascript/html browser, rather than a normal windowing system. Upon an event, the component would send the event object back to the server, the server would process this, and update all components subscribed to the model, the components would then decide whether they need to be redrawn or not, and the new state of these components would be collected, packaged up in xml, and sent back to the client.

This would mean that only the components that change would need to be updated and redrawn, and the whole page need not be reloaded.

A quick poke around found a couple of interesting projects:

Leave a Reply