Let's talk about AJAX… 30daysofJavaScript ==> Day 25

Olajide Blessing Niniola
3 min readMar 19, 2022

AJAX is simply short for Asynchronous JavaScript And XML, to explain further, it simply means a part of JavaScript that allows the timing of operations rather than regular intervals. It is worth knowing that JSON has pretty much taken over XML when it comes to AJAX, so you are most likely going to be working with JSON rather than XML. An example of an AJAX operation is “the load more” action, the gradual display of information on a stroll, submitting an order and so on. These operations enable a good user experience and developer experience too (developers have to worry less about load time). The fun thing about AJAX is that it allows all operations to be done without reloading the page.

Fun facts about AJAX

Having given a not so formal introduction on what Ajax can do, let's talk about why Ajax was really put into place, what was the purpose of coming up with it? You see the definition of Ajax can be a mouth full but trust me it is well more interesting than you think

Ajax is a sort of rich internet technology that is categorically based on open standards such as:

  • Browser presentation using HTML and CSS.
  • Data stored in XML/JSON/text format on a piece of the server or in a folder.
  • Using XMLHttpRequest objects to fetch the data.
  • And of course, the king of the web (Javascript) to make it all happen.

A very important part of AJAX is the art of XMLHttpRequest, this API in an object form is what connects the developer and the objects. You can also assume XMLHttpRequest as a waiter that takes communicates your order to a kitchen at a restaurant.

Although, these libraries are very convenient to use it is important to know one or two syntaxes on how to AJAX without any of them (library).

In most live projects, you will probably be working with more than just a third-party API and connecting with backend technologies such as database SQL, Node.js, PHP and other popular backend technologies.

AJAX Reference and Examples

Below are examples/snippets on AJAX.

  • Getting a text from a folder
  • Text suggestions

There are tons of things that AJAX can achieve, please check here for reference.

The purpose of this article is to have a foundation knowledge about how fetch, Axios and other APIs for generating and manipulating data were formed.

What is this about?

30daysofjavascript is a series of writing on how I learned to code in JavaScript. These episodes are as simplified as possible and for beginners like me, I hope you find JavaScript less confusing throughout this episode. Thank you as always and see you in the next episode. Check out every episode I have written here.

--

--