html5-img
1 / 8

AJAX

AJAX. AJAX?. AJAX – Asynchronous Javascript and XML It is a technique involving JS/XML Communication with a server HTTP in background Client side logic that makes a web app experience more like a desktop app Typically by manipulating the Document Object Model (DOM). Fundamentals.

malise
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

  2. AJAX? AJAX – Asynchronous Javascript and XML • It is a technique involving JS/XML • Communication with a server HTTP in background • Client side logic that makes a web app experience more like a desktop app • Typically by manipulating the Document Object Model (DOM)

  3. Fundamentals • Asynchronous - ? • Non-blocking request. Send request and continue doing what you do. Handle response whenever it comes • Typically ideal when request handled offsite (and you aren’t doing the work

  4. Javascript C/Java like language No longer tied to Java, just in name Weakly typed – everything is just a var Modularity is weak … wat?

  5. Example var map;function initialize(){varmapOptions={    zoom:8,    center:newgoogle.maps.LatLng(-34.397,150.644),mapTypeId:google.maps.MapTypeId.ROADMAP};  map =newgoogle.maps.Map(document.getElementById('map-canvas'),mapOptions);}google.maps.event.addDomListener(window,'load', initialize);

  6. XML XML is the format of data exchange Request and Response is handled in XML which directly corresponds to DOM convention

  7. HTTP • GET – Requests data from a specific resource • Can be cached • Can affect browser history (back button behavior) • Name/value pairs in the URL • POST – Submits data for processing in the HTTP body • Name/value pairs in the HTTP message itself • Heavier, typically slower, but cleaner (basically only advantage) • Good for binary data, large amounts of data

  8. Example

More Related