You’ve probably seen the term “API” come up. Operating system, web browser, and app updates often announce new APIs for developers. But what is an API?
Table of Contents
Application Programming Interface
The term API is an acronym, and it stands for “Application Programming Interface.”
Think of an API like a menu in a restaurant. The menu provides a list of dishes you can order, along with a description of each dish. When you specify what menu items you want, the restaurant’s kitchen does the work and provides you with some finished dishes. You don’t know exactly how the restaurant prepares that food, and you don’t really need to.
Similarly, an API lists a bunch of operations that developers can use, along with a description of what they do. The developer doesn’t necessarily need to know how, for example, an operating system builds and presents a “Save As” dialog box. They just need to know that it’s available for use in their app.
This isn’t a perfect metaphor. Developers will have to provide their own data to the API to get the results. It’s more like a fancy restaurant where you can provide some of your own ingredients the kitchen will work with.
But it’s broadly accurate. APIs allow developers to save time by taking advantage of a platform’s implementation to do the nitty-gritty work. This helps reduce the amount of code developers need to create. It also helps create more consistency across apps for the same platform. APIs can control access to hardware and software resources.
An API Provides a Layer of Security
Your phone’s data is never fully exposed to the server. Likewise the server is never fully exposed to your phone. Instead, each communicates with small packets of data, sharing only that which is necessary—like ordering takeout. You tell the restaurant what you would like to eat. The restaurant tells you what they need in return and then, in the end, you get your meal.
APIs have become so valuable that they comprise a large part of many business’ revenue. Major companies like Google, eBay, Salesforce.com, Amazon, and Expedia are just a few of the companies that make money from their APIs. What the “API economy” refers to is this marketplace of APIs.
The Modern API
Over the years, what an “API” is has often described any sort of generic connectivity interface to an application. More recently, however, the modern API has taken on some characteristics that make them extraordinarily valuable and useful:
- Modern APIs adhere to standards (typically HTTP and REST), that are developer-friendly, easily accessible and understood broadly
- They are treated more like products than code. They are designed for consumption for specific audiences (e.g., mobile developers), they are documented, and they are versioned in a way that users can have certain expectations of its maintenance and lifecycle.
- Because they are much more standardized, they have a much stronger discipline for security and governance, as well as monitored and managed for performance and scale
- The modern API has its own software development lifecycle (SDLC) of designing, testing, building, managing, and versioning. Also, modern APIs are well documented for consumption and versioning.
APIs Make Life Easier for Developers
Let’s say you want to develop an app for an iPhone. Apple’s iOS operating system provides a large number of APIs—as every other operating system does—to make this easier on you.
If you want to embed a web browser to show one or more web pages, you don’t have to program your own web browser just for your application. You use the WKWebView API to embed a WebKit (Safari) browser object in your application.
If you want to capture photos or video from the iPhone’s camera, you don’t have to write your own camera interface. You use the camera API to embed the iPhone’s built-in camera in your app. Without APIs, app developers would have to create their own camera software and interpret the camera hardware’s inputs. But Apple’s operating system developers have done all this hard work so the developers can just use the camera API to embed a camera, and then get on with building their app. And, when Apple improves the camera API, all the apps that rely on it will take advantage of that improvement automatically.
This applies to every platform. For example, do you want to create a dialog box on Windows? There’s an API for that. Want to support fingerprint authentication on Android? There’s an API for that, too, so you don’t have to test every different Android manufacturer’s fingerprint sensor. Developers don’t have to reinvent the wheel over and over.
APIs Are Used For Communication Between Services
APIs are used for all kinds of other reasons, too. For example, if you’ve ever seen a Google Maps object embedded on a website, that website is using the Google Maps API to embed that map. Google exposes APIs like this to web developers, who can then use the APIs to plop complex objects right on their website. If APIs like this didn’t exist, developers might have to create their own maps and provide their own map data just to put a little interactive map on a website.
And, because it’s an API, Google can control access to Google Maps on third-party websites, ensuring they use it in a consistent way rather than attempting to messily embed a frame that shows the Google Maps website, for example.
This applies to many different online services. There are APIs for requesting text translation from Google Translate, or embedding Facebook comments or tweets from Twitter on a website.
If you’ve gotten through this, you’ll have a better idea of what an API is. Ultimately, you don’t really need to know what an API is unless you’re a developer. But, if you see a software platform or service has added new APIs for various hardware or services, it should be easier for developers to take advantage of such features.
In need to provide you some tech services? Check our website here and don’t hesitate to contact us.
Its wonderful as your other blog posts : D, regards for putting up. Rois Rooney Gaut