Spare me the technical jargons please!
So in this article I'm going to answer questions that as at when I was a Junior Dev I did not have any answers to. I wish someone had made a post about it when I started out. So here I am and the goal is simple: Explain what an API is in non Dev Talk, so help me God!
"Everything Should Be Made as Simple as Possible, But Not Simpler"
In this article we will take an approach of asking questions and then providing answers which should be sufficient enough to answer the question without any loss in explanations or meaning.
Answer: There is this common misconception about what an API really is even after you have read the definitions on Wikipedia and all other sources that first begin with the Keyword definition: Application Programming Interface. Emphasis on Interface here that often causes a confusion not to mention the use of examples like Twitter API, YouTube API, Facebook API and APIs made by tech giants and then as a noob there’s this misconception associated with such thinking that APIs are made by the Tech Giants ONLY!
Well with this one question, I will provide three answers. As there exist two unasked questions given this one. The other two being:
An API is basically a piece of Software like an APP running on your Phone or a Website.
Before the “Senior Engineers” call this misleading, please remember that I said at the beginnig that this will be a non technical explanation!
Here’s a visual representation that explicitly explains in steps:
At this point it is safe to resort to using an Analogy to explain the answer and thereby give it some depth.
Yes, I compared an API to an APP on Mobile or a Website. Now to be explicit:
Both Apps run (are hosted) on a server before you can have access to use. The App has a code base which may be (or not) split into the front-end and the back-end. You do not see and maybe are not interested in the logic (code) that causes this app to run. You have it as a complete Software that you can access! An API is basically the same, it is a piece of Software hosted on a server that you can access for a myriad of reasons and usage.
Yes, you can build one! Simple enough answer! In a follow up article to this one I will teach you how to build an API using ExpressJS on Node with either MongoDB or PostgreSQL and you will push out to a server and have others use it. Watch out for this article. Like the Big Tech Giants, other people can use your API as well. The beauty here being that, they can use (consume) it on either Desktop or Mobile.
In closing this is what I wish I’d known when I started as a Junior Engineer and the buzz word was often thrown around and I felt dizzy when I discovered big tech companies where the ones who had APIs publicly available. Well, there, this is one of the many ways that it be made into simple language for non techie. If you have more questions, concerns or simply want to add your thoughts to this conversation, please you are kindly welcome to that in the comments section. Also be on the look out for the follow up articles where I build an API and walk you through the entire process so that you can begin building some yourself.