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.
Objectives for this class are:
- 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.
Applicable Job Roles: Front-end web developer, web developer, software engineer, programmer