What is application programming interface (API)?

API-100freesoft.net

Have you ever shopped at a place that promised lower prices by cutting out the middleman?

triggered-100freesoft.net_

Although this might make things easier in the real world by not having to deal with a cheesy storefront, and high pressure salesman who’s desperate for a commission, the middleman or lady is actually very important in computer land.

You see the software that you use can be thought of as a club sandwich like stack of different programs, some of which sit between whatever program that you’re interacting with directly and the hardware itself, because without these layers, programmers and developers would have to code differently for every single hardware configuration on the planet, which would be impossible. Other layers sit between two different pieces of other software and help them talk to each other without needing to have tons of code in common.

These software layers help standardize the coding process so that programs can interface with lots of different stuff easily. While you might be most familiar with a layer called a device driver and that translates program instructions, and talks directly to your hardware. Another layer called an application programming interface, or API, can be just as important, but if a driver is already there then to serve as the link between your hardware and programs, then what does the API actually do? Well, think of it like this.

windows-linux-macos-interface-100freesoft.net_

Windows Mac OS, and Linux all provide a graphical interface, your buttons, checkboxes, menus, etc, that are easy to click on. Without that, you’d be left tediously typing commands for everything you want to do like back in the days when DOS ruled the world. Similarly an API provides a simpler way for developers to interact with other kinds of software. A really good example of this is social media plugins that you see on certain websites, such as a news article that embeds tweets, or a page that for better or for worse lets people leave Facebook comments under it.

facebook-API-100freesoft.net

Both Twitter and Facebook have their own APIs that they make available to web developers, making it easy for them to bake Twitter and Facebook features into their own pages. Without these API’s, these social media giants would have to share code directly with owners of other sites, which would be tedious, difficult, and possibly give away certain trade secrets. But if you’re a PC Gamer, you might be even more familiar with graphics APIs such as DirectX, OpenGL, and Vulkan, which sit between the engine of whatever game you’re playing, and your graphics card driver. These APIs make it easier for game developers to code cool effects that bring your favorite characters, and stories to life, and have them work regardless of whether you have an AMD or an Nvidia GPU. Since the API can talk to any mainstream graphics card and as GPU technology advances, you’ll see new revisions of graphics APIs being rolled out that can take advantage of more powerful graphics chips. But even if you don’t game, or argue with random trolls in Facebook comments, you’re still taking advantage of APIs all the time if you’re a Windows user.

windows-buttons-and-status-bars-100freesoft.net

Windows has it’s own API, uninspirationally named the Windows API, commonly referred to as Win-32 or Win-64 depending on whether you’re running a 32 or a 64-bit application. Windows API makes it easier for programs to do things like talk to your devices, modify your registry, use screen elements like buttons, and status bars, and much more, without making the developer code these things directly, and also helping users by providing a more reliable and consistent experience. I mean, can you imagine if every single program on your computer had a different looking close button in the corner? So, while APIs might not be the usual star of the show when you’re doing whatever it is you do on your PC or phone, they make it possible for all of our disparate devices, and software to work well with each other, and enabled a massive amounts of quick communication, and high-end gaming that we’ve gotten used to.