70 likes | 196 Views
Ajax: Asynchronous JavaScript and XML. Scott Marks CNT 4104 - Computer Network Programming Florida Gulf Coast University Fort Myers, Florida October 24, 2008. Introduction. Server requests without page reloads Read XML databases Not a new programming or scripting language
E N D
Ajax: Asynchronous JavaScript and XML Scott Marks CNT 4104 - Computer Network Programming Florida Gulf Coast University Fort Myers, Florida October 24, 2008
Introduction • Server requests without page reloads • Read XML databases • Not a new programming or scripting language • Uses current web standards: • JavaScript, XML, HTML, DOM, CSS
Details of the Technology (1/2) • Centers around the XMLHttpRequest (XHR) object • Handles communication with the server • Uses GET or POST • Newer browsers have direct support for the XHR object • IE 6 uses an ActiveX object
Details of the Technology (2/2) • The asynchronous aspect permits page refreshing without the user seeing a page reload • Multithreading is not supported but should be considered during development • Possible that an Ajax program can break the browser’s navigation button • Example: slide shows
Outline of a Programming Example • Data auto-refresh • Example: sports scores and in-place editing • Live validation • Example: account sign-up • Suggestions • Example: Google Suggest
Conclusion • A new method of using old technologies • Permits extensive website interactivity • Can offer a significantly better user experience • Easy to learn the basics