What is an API (Application programming interface)? Explained using Waiter and Airlines Example.

Connectivity is an amazing thing. By now, we're all used to the instant connectivity that puts the world at our fingertips from desktops or devices we can purchase post pin and pick anything anywhere.

We have connected with the world and got to know each other in an unprecedented way, but how did that happen? how does the data go from here to there? How different devices and applications interact, allowing us to place an order, book, or book a flight with just a few clicks or by clicking the unknown hero of our connected country, the Application Programming Interface or API, the engine under the hood and behind the scenes, we take for granted, but is that what makes it possible?

All the communication we expect and rely on, but actually an API, is a question everyone asks.

Definition:

The description of the textbook goes like this. In a computer program, the application programming interface is a set of routines protocols, and working tools, it is safe to say, the API is the messenger that picks up the applications, and tells the system, what you want to do, and then send feedback back to you.

To give you a typical example, think of an API as a waiter in a restaurant. Imagine you are sitting at a table with a selection menu to order and the kitchen is part of a plan, which will customize your order. What is missing is a critical link to connect with your order in the kitchen and return your food to your table. This is where the waiter or API comes in. The waiter is the messenger who takes your request, or the order to tell us the plan. In this case, the kitchen, what to do. Then return the answer to you. In this case, food.

Now that we have bitten your food. Let's use this for a real example of the API, You probably know the process of searching for airlines online. Just like in a restaurant, you will have a menu of options in the drop-down menu. In this case, you select the city of departure, date, return city, and state class, and other alternatives to book your contact flight and airline website to access the airline database to see if there are seats available for those days, and how much the cost can be based on variables. if you are not using an airline website with direct access to information, what if you are using an online travel service that includes information from many different airlines, the flight service integrates with airlines API.

The API is an interface that, like you're helping where can be asked by that online travel service to get information from the airline system over the Internet to book seats, choose meal preferences or baggage options. It also then takes the airline's response to your request and delivers it right back to the online travel service, which then shows it to you. 

So, now you see that APIs enable us all to use travel sites. The same goes for all communications between apps, data, and devices, all with APIs that allow computers to use. And that's what ultimately creates communication. So whenever you think of an API. Think of it as your waiter working back and forth between apps, data, and devices to deliver data and build connections that put the world in our hands.

"ml-auto"(margin-left) in Bootstrap-5 not working:

The latest stable version of Bootstrap was released on  5th May 2021. Bootstrap is the most popular CSS framework for developing responsive and mobile-first websites.
Now, let's move towards our problem:

Using Bootstrap say if we build Navigation-Bar as shown in the image below:





Here in the given image, we can see that the "Home/Blog"...... these links are aligned in the left of the navigation bar. So, if we want to align them to right we have to use the "ml-auto" class in the parent so that we can align them to right. The class is highlighted in red in the image given below:


But in some cases, this class does not work and does not align the element to the right. So we have found the solution to this problem.
Simply we have to add "justify-content-end" to the parent class as shown below:

By adding this class to the parent and when we save the code we see that the element that we wanted to shift has shifted to the right as shown below:


So this is the solution to this problem.
I hope it helped you.

Thank you
Utkarsh Gupta