Intro
Heart is XHR
AJAX is a marketing term describing use of XHR optionally with orthogonal
technologies such as drag + drop, et al...
Not a panacea.
Page Reloads ---> Ajax
Weary user interfaces ---> light and responsive
What is XHR?
XHR: xmlhttprequest object
* Invented by MS
* Not part of standard
* Widely implemented
* Today relatively common
* Future
http://barcamp.org/FastAJAX
* Technologies worth knowing
o HTTP
o HTML
o DOM
o XML?
o JSON
* How it works
o Asynchronous request.
o Same old HTTP (Get, Post, etc)
HTTP transport mechanism without reloading the page.
NOT strictly XML; any format will do.
XML, HTML, JSON: 3 popular formats for data
XML is familiar.
HTML is familiar.
JSON is javascript literal object notation eg:
myobject = {
'properties' : 'hello',
attributes : 'world',
go : function () { alert(this.properties + ' ' + this.attributes) }
}
**
Eval it and you can get complex interactions.
Sessions and cookies work as you would normally expect on a normal webpage.
Benefits:
Faster, lighter interactions. Less weary on users. Do more with less.
Faster implementation??
Disadvantages:
Potentially dangerous, easily confounded, won't work without javascript,
inaccessibility problems, UI abuse eg breaking the back button.
References:
http://barcamp.org/FindPage?SearchFor=Ajax
http://barcamp.org/10SecondAjax
Put your hcard on a map. Instant Disposable Map
http://www.nearwhere.com/guest/
Mashup of ski resorts and hotels.
http://skiwhere.com/map/
Excellent XHR intro
http://jibbering.com/2002/4/httprequest.html
Good simple example of how it works.
http://www.dichotomize.com/czmap/gbold.html
Popular Examples:
http://flickr.com
http://gmail.com
http://local.google.com