AJAX

So… you just finish building your REST API and your front-end for your web application, the next steps is to allow these components to communicate with each other. Well, you’re in luck,  AJAX is the perfect tool for you. AJAX stands for Asynchronous Javascript and XML and it allows web pages to be updated asynchronously by exchanging data with a web server behind the scenes. This means that it is possible to update parts of a web page, without reloading the whole page. AJAX achieve these features with a browser built-in XMLHttpRequest object which allows the web app to request data from a server, and JavaScript and HTML DOM to display or use the data. 

During my research stage while working on the connection between the front-end and the server I learned that although XMLHttpRequest is good tool which allow the  web application to request data from a server it contains a few drawbacks. The main drawback is the complexity of using XMLHttpRequest whereas the Fetch API is simpler and cleaner API, avoiding callback hell and having to remember the complex API of XMLHttpRequest.

To learn more about fetch API https://mzl.la/1M97RRE

Resources link:

https://bit.ly/2ouyaT2  

https://bit.ly/2qd01rh

Leave a comment

Design a site like this with WordPress.com
Get started