Yogesh Chauhan's Blog

What is an API?

in Miscellaneous on March 3, 2020

Wikipedia definition is: 

An application programming interface (API) is an interface or communication protocol between different parts of a computer program intended to simplify the implementation and maintenance of software.

In simple terms, 

An application program interface (API) is a set of protocols and rules for building software applications that specifies how different software parts should interact.

Even simpler terms…

An API is just a bunch of code that allows two programs to communicate with each other.

An API may be for a web-based system, operating system, database system, computer hardware, or software library. Some popular APIs are Google Maps APIYouTube APIsTwitter APIs etc.

How do they develop API? Do they share everything?

The answer is, obviously not. They use abstraction to show whatever is necessary and everything else is hidden.

In building software, an API simplifies programming by abstracting the underlying implementation, the basic structure. It only exposing objects, functions and actions which the developer needs. For example, if you’re building an API for an email service, you don’t need to show how the overall email structure works to everyone that uses the API. You can just simply provide a user with a button that performs all the steps for fetching and highlighting new emails. In building an API for file input/output, just show a function that copies a file from one folder to another folder and not the overall file system operations that are occurring behind the scenes.

Advantages?

Crating APIs and exposing your data data with that API can improve the customer experience. How? Well, one simple argument is that using Google Maps API, many people are learning how the Google maps works and building even better applications using that API. It’s expanding Google maps acually and there are tons of examples like that.


Most Read

#1 How to check if radio button is checked or not using JavaScript? #2 Solution to “TypeError: ‘x’ is not iterable” in Angular 9 #3 How to add Read More Read Less Button using JavaScript? #4 How to uninstall Cocoapods from the Mac OS? #5 PHP Login System using PDO Part 1: Create User Registration Page #6 How to Use SQL MAX() Function with Dates?

Recently Posted

#Aug 15 Is PHP still good for back-end programming? #Aug 10 How to create a multisite network in WordPress? #Aug 3 How to create a circle that follows a cursor using JavaScript and CSS? #Aug 3 How to make a curtain slider using jQuery and CSS? #Aug 2 How to progressively load images and add a blurry placeholder? #Aug 1 How to create a placeholder loader (throbber) using CSS?
You might also like these
Can We Use For Loop to Loop Through Associative Arrays in PHP?PHPMake sure your links have descriptive textUI/UXPHP Login System using PDO Part 2: Login using Email or UsernamePHP5 Steps to Create a Line using Canvas Tag in HTML5HTMLHow to modify navigation menus in WordPress?WordPressWhat are CSS Specificity Rules and how does browser apply them?CSS