1 / 22

Understanding AJAX

Understanding AJAX. Hype, Hope, Hurt and Help for the Web. MJTS May 4th, 2006 _________________________ Terence Conklin, Conklin Systems www.conklinsystems.com. The Very Short Presentation. AJAX allows you to call server code from web pages!

annot
Download Presentation

Understanding AJAX

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. UnderstandingAJAX Hype, Hope, Hurt and Help for the Web MJTSMay 4th, 2006_________________________Terence Conklin, Conklin Systemswww.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 AynchronousJavascriptand 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. 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. How AJAX works

  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 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 AJAX in action

  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. 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 AJAX as a Gremlin

  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...

More Related