Joke Collection Website - Talk about mood - Yes, tell me what the api interface means.

Yes, tell me what the api interface means.

API is an interface, a channel, which is responsible for the communication between a program and other software. Its essence is a predefined function. Your answer also gives many intuitive examples. Here I want to talk about a good API from another angle, hoping it will be useful to everyone. For example, when we go to work, the window is similar to an API. If this window allows us to "run at most once" and "just stamp" something that is not simple, this API is good. (of course, the API is different. Applying the principle of interface isolation, that is, using multiple isolated interfaces, such as writing user registration and user login, can improve the flexibility of programming. )

However, we know that it is still very difficult to "run at most once" in reality, and relevant departments need to sort out various internal processes and data channels so that this window can easily get all kinds of data to help us. Therefore, it is not easy to design a good API.

Another interpretation from designers emphasizes that API includes calculation and logical judgment: suppose that the "goods" in logistics are data, the "warehouse" for storing goods is database, and the "store" is our website and App. The contents and figures displayed on the page, as well as the user's operation requests and results are all "goods"-data that need to be transported continuously, so the transfer station responsible for deployment, distribution and packaging is API, and the shop assistant can just pick up the goods directly from the transfer station.

As can be seen from the above, the role of API is also obvious:

-For software providers, leave the API to other applications to call, forming an ecology, so that the software can exert its maximum value and be more vital. (At the same time, others can't see the code, so it won't hurt trade secrets. )

-For application developers, with an open API, they can directly call the functions made by many companies to make their own applications without doing everything themselves, saving energy.