1 / 14

AJAX

AJAX. MIS 424 Professor Sandvig. Today. What is AJAX Benefits & Uses Implementation Do-it-yourself Download API ASP.NET Ajax Summary. What is AJAX. Acronym A synchronous J avaScript A nd X ML What it is JavaScript in web page retrieves data from server Data format is XML

blythe
Download Presentation

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. AJAX MIS 424 Professor Sandvig

  2. Today • What is AJAX • Benefits & Uses • Implementation • Do-it-yourself • Download API • ASP.NET Ajax • Summary

  3. What is AJAX • Acronym • Asynchronous JavaScript And XML • What it is • JavaScript in web page retrieves data from server • Data format is XML • Allows partial page refresh • Reduces need to refresh entire page

  4. Benefits & Uses • Benefits: • Richer experience for user • More like using desktop application • Uses • Google Suggest • Google Maps • Cascading Menus (Kelly Blue Book) • REI product image (menu is JavaScript) • Google Docs • etc. etc.

  5. Implementation Options: • Do-it-yourself • Lightweight, flexible • write or modify JavaScript or jQuery • Use API • Google, Yahoo, Highslide, … • ASP.NET AJAX • drag & drop in VS • convenient • adds a lot of code to application

  6. Do it yourself • Client • Include JavaScript or jQuery in web page • Requests data from server • Server • Web service provides data • Format: XML, JSON, HTML, …

  7. Do it yourself • Benefits • Flexible • Lightweight • Drawbacks • Time consuming • Some knowledge of JavaScript/jQuery

  8. Do it Yourself Examples

  9. Use AJAX API • Ajax applications written by others • Google AJAX APIs • Search • Maps • Calendar • Facebook APIs

  10. ASP.NET AJAX • ASP.NET provides built-in AJAX functionality • Two flavors: • Built into some Data Controls • Limitations • ScriptManager & Update Panel • Very flexible

  11. Server Controls • Built in AJAX functionality • GridView, DetailsView, FormView • Property: AllowSortingAndPagingCallbacks • Benefits • Easy to implement • Limitations: • Controls cannot use templates • Inefficient: retrieves all data and discards extra

  12. UpdatePanel • UpdatePanel • Wrap any server controls • Become AJAX enabled • Benefits • Easy to implement • Flexibility • Mix & match controls • Specify triggers

  13. Update Panel • Disadvantage • JavaScript cannot be tweaked • Fine if it meets your needs • Heavy • All controls are repopulated • Viewstate also sent/received • Example: • Cascading Dropdown: • AjaxAspNet.aspx

  14. Summary • AJAX • Use to improve user experience • Partial page refreshes • Options: • Code you own • Use APIs • ASP.NET AJAX

More Related