Developers love to refer to APIs. But what does API mean?
So, API stands for Application Program Interface, but this still leaves jargon like routines, protocols and the acronym GUI left unanswered. For a simple insight into what an API does, imagine the following scenario:
- You are starting a company and want to open a shop to sell your products (lets say a bakery);
- You open a store on the high street (or create a simple WordPress website) but at the moment you have no ingredients (or popular functions);
- In order to bake bread you need to buy ingredients from another business (or in developer talk you need to use a function from another business in order to offer a certain service);
- So you would set up a relationship with a supplier who can, whenever you call them, provide you with a delivery of ingredients (or in developer terms when you call them, click on something on your website, it will speak to that other company’s site to get the information it needs); and
- Now that you have your ingredients (or function) you can bake bread.
Or in a real world example:
- You want to have Google Maps on your website;
- You have to set your website so that it knows how to talk to Google Maps;
- The API allows your website to talk to Google Maps and retrieve the information that you require; and
- Google Maps works on your site!
There are many apps and services that offer APIs, which can reduce the workload for a developer. Much like the bakery example above, you could go out and farm your own flour and keep chickens for eggs, but this is time consuming and will have a much more significant initial setup cost. The only commitment in this instance is the initial developer time for the setup, much like setting up a new supplier.
A significant advantage of APIs is that they are programming language agnostic and so can be communicated with using any coding language. You may come across an API language library, although these are just aids in the use of an API for specific languages and are by no means a necessity in setting them up.
A Final Warning on API use
Just because an API works today doesn’t mean it will tomorrow. Next week’s post on Google Maps will demonstrate how APIs are constantly evolving. Not only do they keep up-to-date with the latest coding practices, but they also change with corporate approach, like when Twitter restricted third party access to their API in 2012.API, Code, Development, Interface