Download presentation
Presentation is loading. Please wait.
Published byCharity Pearson Modified over 9 years ago
1
Understanding AJAX Hype, Hope, Hurt and Help for the Web MJTS May 4th, 2006 _________________________ Terence Conklin, Conklin Systems www.conklinsystems.com
2
The Very Short Presentation AJAX allows you to call server code from web pages! Look to your favorite web development approach for convenient support Thanks for coming!
3
AJAX Aynchronous Javascript and XML
4
The Tao of AJAX HYPE HURT HOPE HELP
5
AJAX The Hype
6
AJAX is not… A language A toolkit A development environment New
7
AJAX is.. A new name for an old approach Not actually dependent on XML A technology originally developed by Microsoft A single function call Only one of a number of techniques for asynchronous access
8
How AJAX works The web server gets a standard page request The client loads the page. Javascript on the page fires on an event The script makes an XMLHTTP Get or Post to the server The server sees it as just another HTTP request The result is sent to the client A callback function in the client Javascript is fired when the data is complete.
9
The long road to AJAX Async before AJAX: –Microsoft Remote Scripting via an applet –Hidden IFRAMEs –Numerous libraries building on the above –XMLHttp object, and later XMLHTTPRequest In 2005, the catchy name AJAX was coined, and a star was born!
10
AJAX The Hope
11
AJAX changes the Web Rules Data can be loaded on demand Pages can be interactive It’s possible to pull small amounts of data Web pages can store state Scripts can load dynamically What would you do if you could call functions on the server in your web page?
12
A Minimal Example Using the SAJAX toolkit on PHP, just: Include the Sajax library in your PHP Declare your server-side functions Let Sajax know which to export Include the Sajax-gen’d script in the HTML Declare a callback for the results Call the server function with a Javascript call
13
AJAX in action AJAX enhanced: Google Maps Google Suggest Openrico Dyn Tables Rev10 Edit-in-Place Tables App Replacement: Cojax Source Viewer Google Calendar ajaxWrite True innovation: Global Mosaic
14
Benefits of the AJAX approach Familiar web usage model Leverages existing web development skills Can secure proprietary code on server Integrates ‘apps’ seamlessly with existing web content “Zero install” technology On the web, the app is always current
15
AJAX The Hurt
16
AJAX as a Platform The universal platform that’s not –Browser specific, Treos, Lynx, Cellular A miserable development environment –Many mixed languages, challenging to debug, widely varying clients, questionable UI Entirely reliant on Javascript Requires ActiveX on IE6
17
AJAX as a Gremlin Cross domain security issues HTTP max number of connections These function calls can fail Wasn’t designed to be RPC, and it shows Out of order responses Dearth of tech resources for adv. Javascript Potentially huge traffic Tools are very new and very much in flux End result will never match the OS APIs
18
AJAX as a web page Breaks basic browser features –Back button –Bookmarks –Refresh –Accessibility Various workarounds and hacks have been developed
19
AJAX The Help
20
How can you use AJAX today? Read up! Start small Don’t be afraid to try toolkits Expect your current environment to add AJAX support Refresh those Javascript skills Watch for interesting developments
21
Where do you use AJAX today? Continue with your core web development Solve targeted web usage problems Focus on small features with a big impact Leverage the flood of AJAX toolkits –Many have one or two ‘killer features’ packaged in an easy-to-use format. Look at new websites through new eyes
22
fin...
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.