What is an API? Application programming interfaces explained

stands for programming interface, a concept that applies everywhere from command-line tools to enterprise Java code to Ruby on Rails web apps. An is a way to pro-grammatically interact with a separate software component or resource.

Unless you write every single line of code from scratch, you’re going to be interacting with external software components, each with its own API. Even if you do write something entirely from scratch, a well-designed software application will have internal APIs to help organize code and make components more reusable. And there are numerous public APIs that allow you to tap into functionality developed elsewhere over the web.

What is an API?

An API is defined as a specification of possible interactions with a software component. What does that mean, exactly? Well, imagine that a car was a software component. Its API would include information about what it can do accelerate, brake, turn on the radio, etc. It would also include information about how you could make it do those things. For instance, to accelerate, you put your foot on the gas pedal and push.

The API doesn’t have to explain what happens inside the engine when you put your foot on the accelerator. That’s why, if you learned to drive a car with an internal combustion engine, you can get behind the wheel of an electric car without having to learn a whole new set of skills. The what and how information come together in the API definition, which is abstract and separate from the car itself.

One thing to keep in mind is that the name of some APIs is often used to refer to both the specification of the interactions and to the actual software component you interact with. The phrase “Twitter API,” for example, not only refers to the set of rules for programmatically interacting with Twitter, but is generally understood to mean the thing you interact with, as in “We’re doing analysis on the tweets we got from the Twitter API.”

API as abstraction layer

When it comes to software, APIs are literally everywhere. APIs go hand in hand with one of the most fundamental concepts in computer science: abstraction. Abstraction is just a way of organizing the complexity of a system so that complicated actions can be handled in a simple way. Think of this abstraction like those Amazon Dash Buttons, the battery operated, push-button circuit boards you can use to order staples from Amazon. This is what they look like:

You might also like More from author

Leave A Reply

Your email address will not be published.