DEV Community

Cover image for API Explained to a 5 year old kid LITERALLY!
Om Shah
Om Shah

Posted on

API Explained to a 5 year old kid LITERALLY!

Disclaimer

This is a blog to explain topics in a funny way and I don't intend to hurt anyone's feelings

Introduction

What is an API? Well, it's Application programming interface.
(gasp) F**k that a huge word! No problem we will calmly ask google.

Image description

So, I searched it and scanned/read many documents and here's what it means...

Explained - LITERALLY TO A 5 YEARS OLD KID

OK! So, imagine you are a 5 year old kid! Nice now you are stupid I feel superior!

So, you have 7 crayons and you want to give it to your friend who is in next room! Now, if you are little bit smart you won't give it one by one going to his room and give it, rather you will put them in a box ( cuz you have small hands and crayons are large ) and give it to him!

Here, you are the user aka stupid , your friend is the application from where you want to pass the data and box is the API!

Explained - Other common EXAMPLE

AGAIN! Imagine you are in a restaurant and you want to order food but you won't go directly to the chef and ask them to make you the food you want, rather you will call the waiter and say him your order which he will take to the chef! SIMPLE!

Here, You are the Customer aka User, Chef is the Application and API will be the Waiter aka low waged person!

REAL LIFE EXAMPLE - UbeR

Let's take a look into a real life example because we are not schools.

Now, Uber seems one application but Behind the Scenes it is the mixture of many service application like Payment , Order , etc.
[ This Distributing work into smaller parts is called Microservice Architecture but more on that in other blogs ]

Now, to communicate through their apps they have to pass data through API!
It's like they Talking with each other with API like calls, letter and emails.

BUT FOR YOU IT IS ONE APPLICATION!

Image description

Top comments (0)