Nov 20, 2008
AJAX A Brief Introduction to AJAX
AJAX Defined Jesse James Garrett 2/18/05 http://tinyurl.com/7xzse – Hype Ground 0 “ Ajax isn’t a technology. It’s really several technologies, each flourishing in its own right, coming together in powerful new ways. Ajax incorporates: standards-based presentation using XHTML and CSS; dynamic display and interaction using the Document Object Model; data interchange and manipulation using XML and XSLT; asynchronous data retrieval using XMLHttpRequest;
Google Maps, Gmail.com, Google Suggest, Digg.com,
Better than Flash? http://getahead.ltd.uk/ajax/ajax-flash-compared
Depends on the needs of the application
AJAX 101 History: “Microsoft first implemented the XMLHttpRequest object in Internet Explorer 5 for Windows as an ActiveX object. Engineers on the Mozilla project implemented a compatible native version for Mozilla 1.0 (and Netscape 7). Apple has done the same starting with Safari 1.2.”
AJAX is special because so many browsers support it out of the box.
AJAX 101: XMLHttpRequest The benefit to end users is that they don't have to type as much and they don't have to wait as long. For example, having the user's city and state show up in a webpage automatically after the ZIP code has been typed in is a big time saver.
A Client/Server Computing Model Client Computer Browser Server Computer HTTP Service HTTP REQUEST HTTP RESPONSE (URL,Post,Get,..) (XHTML...) A State-less Environment
Client Browser (state A) HTTP Server HTTP REQUEST HTTP RESPONSE New Page Default Synchronous Processing Scenario Client Browser (state B) (state A) (state A + … = state B)
Client Browser (state D) Client Browser (state A) HTTP Server REQUEST RESPONSE – New Page Asynchronous Processing Scenario Client Browser (state C) Client Browser (state B) REQUEST/RESPONSE REQUEST/RESPONSE Using XMLHttpRequest Object
What to do next Use XAMPP or buy a cheap web hosting account. XAMPP is a free easily installable Web development environment for Windows, Linux & OS X http://apachefriends.org
Visit live AJAX demo sites:
Book: AJAX in Action by Dave Crane and Eric Pascarello with Darren James http://www.manning.com/books/crane/ Screencasts at http://tinyurl.com/bebmh
Twenty-two Minute walkthru:
Blog: Ajaxian.com Ajaxian.com has good podcast episode summaries online Rate it up by order of magnitude – that’s ROI XML and DOM manip is really slow only use if you have pre-existing XML api
Prototype extends object and array and this causes problems with other libraries.
Credits Professor Stephen K. Kwan