Joke Collection Website - Blessing messages - What is API and where can I apply it? Are there any examples?

What is API and where can I apply it? Are there any examples?

API (Application Programming Interface), some predefined functions, or conventions that connect different components of a software system. The purpose is to provide applications and developers with the ability to access a set of routines based on a certain software or hardware, without accessing the source code or knowing the details of the internal working mechanism.

The API mainly provides a general function set. API is also a middleware, which provides data sharing for various platforms. In programming practice, the design of programming interface should first make the responsibilities of software system reasonably divided. Good interface design can reduce the interdependence of all parts of the system, improve the cohesion of the constituent units and reduce the coupling between the constituent units, thus improving the maintainability and expansibility of the system.

Extended data

Application program interface principle

In the process of data encapsulation, each layer in the network hierarchy will interact with each other and provide services through interfaces, among which the interface between the application layer and users is called application programming interface (API).

An API is actually a collection of functions, or a collection of definitions and protocols. No matter what kind of set it is, its essence is to mask the details and complexity of implementation for users through abstraction.

From the user's point of view, the application program interface is represented by a series of API functions, which users can use to develop network applications. From the network point of view, the application program interface provides a set of methods for users, who can use this method to send business requests, information and data to the application layer, and all layers in the network respond in turn, and finally complete the network data transmission.

Baidu Encyclopedia-Application Program Interface

Baidu encyclopedia -api