REST API 🚀 — So called a Back-end system 🖥️

Mohammad Fayaz
4 min readDec 16, 2020
Made using Canva

A quick introduction, I am Mohammad Fayaz. A software developer, Computer science (undergraduate) from Hyderabad, India. I work on mobile applications and back-end stuff. Feel free to connect with me for any discussion or job offer(preferably Hyderabad location) at my linked-in.

Audience

This article is for beginners who want’s to study REST API and everything about Web servers.

Note: Please do not read this article while you are in dark mode.

Prerequisites

  • Basic programming knowledge
  • Basic knowledge about Internet

What is REST API?

By definition it says Representational State Transfer (REST). It is because the data is somewhere else and user who wants the data is somewhere else around the world. Didn’t understand? 🤔 Look at the diagram below.

Social media and networking

How things work in real-world?

By observing the above picture you might have got an idea what it is 🙄. If not, let me tell you what’s happening 🧐. Let’s take an example to understand this concept. In your student life, you must have done anything like

Social Media users
  1. Posted pictures in facebook/instagram
  2. Chat with your friends over WhatsApp,
  3. Watched YouTube videos
  4. Checked your academic results online.
  5. Bank transactions

But ever tried to understand how they work? 🤔 Obviously they happen with the help of Internet, but there’s something else involved to accomplish that task. You might have guessed it 😝. Yeah that’s a Web Server.

Software engineers 🧑‍💻 have configured/trained a computer(web server) to respond with certain things when the user requests certain thing. Assume a situation, when you send a message ✍🏻 to your friend over WhatsApp, your friend instantly gets a notification 🤳🏻. Well, how does that happen?🤷‍♀️ is someone sitting there 🦸🏻 and waiting for me to send a message to my friend so that he can quickly run 🚴🏻‍♀️ and deliver the message. Only a superman or wonder women can do that right. But there billions of people 👩‍👩‍👧‍👧 around the world and often send billions of WhatsApp messages per day.

Or assume like your friend already had messages in his mobile even before you sent them to him. Well this could never happen 🙅‍♂️, no one can accurately predict the future and do all these things. Then how do these Software Engineers 🧑‍💻 make it possible️🤷‍♀️ ?

To understand this concept we should first understand Server-Client architecture. In the end we’ll understand the vital role of REST API.

What is Server-Client architecture?

Consider the client as WhatsApp application on your phone and let’s understand how this works…

Clients

Devices used by people in daily life, like a mobile, laptop…

Internet

A medium which connects clients to a known server.

Web Server

Just another computer which serves data over Internet.

Database

An engine which stores data in a particular format and gives the web-server the capability to perform operations on that data.

Here you can notice that if there is no layer of REST API, then any client can directly interact with the database. But it can prove costly at some times, if someone gets access to the client’s code they can mess things up. REST API will act as an extra layer and provides more protection to the data. Don’t worry if you can’t understand anything of this, by the end of this course you’ll definitely have a clear understanding about REST API.

Other articles in this series include

  1. Introduction to REST API and Web servers. (this article)
  2. How web servers work.
  3. Why we should use REST API and Designing a perfect API.

Thank you for reading the article, feel free to follow for more such stuff and don’t forget to smash the clap button.

--

--