A Beginner's approach to understanding APIs

A Beginner's approach to understanding APIs

Introduction

Starting on Programming journey, we have all at on point in time or another heard Software guys play around with the word "API".We might have checked it out using a Dictionary at one point. Let's discuss about what APIs stands for and what it means together.

Definition

Using Wikipedia, "An application programming interface (API) is a computing interface that defines interactions between multiple software intermediaries. It defines the kinds of calls or requests that can be made, how to make them, the data formats that should be used, the conventions to follow, etc. It can also provide extension mechanisms so that users can extend existing functionality in various ways and to varying degrees. An API can be entirely custom, specific to a component, or designed based on an industry-standard to ensure interoperability. Through information hiding, APIs enable modular programming, allowing users to use the interface independently of the implementation."

Explanation

Too much grammar right? I'm getting you are somewhat confused right now. Let's try to break it down in simple terms using illustrations. Connectivity is such an amazing concept when it comes to sending and receiving information across different devices around the world. It all boils down to transfer of data from one source to another or server to client using a medium and that medium is referred to as APIs. A simple illustration of this concept is selecting and ordering for a meal from a menu in a restaurant through a waiter and getting it served to your table. We can see that the medium of information transfer in this scenario is the waiter who acts as a middleman (messenger) between the customer(client) and the kitchen(server). When an order is placed (Client-side), the waiter relays the request to the kitchen (Server-side). The kitchen processes the request and sends back the order in form of a prepared meal through the waiter to the customer. Application Programming Interface (API) can be referred to as the messenger between the client-side application and the server. It relays information to the server and returns a response back to the client.

Conclusion

APIs can be very interesting once you have gotten a hang of it. It is basically an interface that receives your request when you log on to a site and gives you feedback that you can see based on your request on that page.

You might also want to check out this topics