Asynchronous JavaScript And XML (Ajax)

Ajax is an important technology for front end web developers.

Ajax, which is short for Asynchronous, JavaScript and XML, lets you use JavaScript to talk to a web server, retrieve information from the server, and update the content of a webpage without leaving the current page, or loading a new webpage.

Ajax requests are triggered by JavaScript code; your code sends a request to a URL, and when it receives a response, a callback function can be triggered to handle the response.

Web developers use Ajax for different purposes, to inject new HTML into a webpage, to receive JSON data from a web server, to post form data to a database.

Unfortunately, different browsers implement the Ajax API differently. Typically this meant that developers would have to account for all the different browsers to ensure that Ajax would work universally.

Fortunately, jQuery provides Ajax support that abstracts away painful browser differences.


What Will I Learn ?

  • Understand the relationship between the different protocols that comprise "Ajax".
  • Create asynchronous requests through the use of the XMLHttpRequest object.
  • How to use, create and parse a JSON file.
  • Learn .load, $.get Ajax wrapper methods as well as the core $.ajax() method
  • Become familiar with jQuery and its use in efficiently building Ajax applications.
  • Solve problems quickly through the use of error consoles, HTTP inspectors, and JavaScript debuggers.
  • Understand the “same domain policy” security limitations of Ajax and what workarounds can be used (JSONP and CORS).
  • Using 3rd party APIs to interact with Ajax applications.

Prerequisite Knowledge

  • Students will have had to take the Introduction to JavaScript class (P131) AND have taken the Introduction to jQuery class (P135) or have equivalent experience.
  • You must have a basic web host account.

Who can benefits ?

  • Front-end web developer
  • Web Developer
  • Software Engineer
  • Programmer

Opportunity Scope

Mentor shall discuss on classroom.

Modules / Chapter

Week 1: Ajax Overview

  • Ajax basics
  • Creating the XMLHttpRequest object
  • Creating a simple Ajax example
  • GET and POST
  • Review of HTTP methods
  • Ajax Response formats
  • Ajax Callbacks
  • Introducing JSON
  • Parsing JSON

Week 2: jQuery and Ajax

  • .load() method
  • $.get() and $.post() method
  • Posting data
  • Handling errors
  • Troubleshooting and debugging

Week 3: jQuery $.ajax() and Promises

  • $.ajax() method
  • Understanding the jqXHR object
  • Using Promises with Deferred object
  • Beyond same domain policy: JSONP and CORS
  • Working with Third Party APIs (Yahoo, and Flickr)

Week 4: Beyond Ajax: Real-time Web Apps

  • HTML5 WebSockets
  • WebSockets Protocol
  • Testing out the WebSockets API
  • Pusher: Hosted Real-time Servers
  • Creating our real-time app online


Enquiry Form

Required fields are marked (*).

(Max 350 words only)

Contact Information

  • Address

    Anamnagar - 32 Kathmandu, Nepal

  • Email

    info@labanepal.com

  • Phone

    +977-1-4102721, 4102722, 4244804

  • Opening Hours

    10 AM - 5 PM

Registration Form

Required fields are marked (*).

(Max 350 words only)

Contact Information

  • Address

    Anamnagar - 32 Kathmandu, Nepal

  • Email

    info@labanepal.com

  • Phone

    +977-1-4102721, 4102722, 4244804

  • Opening Hours

    10 AM - 5 PM

newsletter

Sign Up for News and Offers

Subscribe for the latest news and great deals we offer