Which do you prefer, SDK or API?

Time:2021-5-13

I haven’t understood the relationship between SDK and API before, and the official explanation is not clear.

In Baidu Encyclopedia, SDK is defined as a software development kit (foreign language acronym: SDK, foreign language full name: software development kit). It is generally a collection of development tools used by some software engineers to build application software for specific software packages, software frameworks, hardware platforms, operating systems, etc. Software development tools include, in a broad sense, a collection of related documents, examples and tools to assist the development of a certain kind of software.

API (Application Programming Interface) is a set of pre-defined functions. The purpose of API is to provide application and developers with the ability to access a set of routines based on a certain software or hardware without accessing the source code or understanding the details of internal working mechanism.

Well, I’m still at a loss. These words are so official that they don’t leave a way for novices. After referring to some articles, I really understand the meaning of SDK and API.

By analogy, an API can be compared to a door key. In a house, each room has its own use and resources. When we want to get the resources of the corresponding room, we need to use the key to open the door first. For example, if we want to get books from our study or pillows from our bedroom, we need to find the corresponding room key first, and then enter the room to get books and pillows. The process of calling the API is the process of opening the door with the key.

The SDK is to put these keys together and integrate the API together. With the SDK, you can have unimpeded access to the house. If you want to get the resources in any room, you can open the door with the key in your hand and go in and get them.

API is divided into open API and private API. Open API, as the name suggests, is an interface that is open to everyone, allowing anyone to call it and get the data behind it. It is just like a library. You only need to carry out the corresponding identity authentication to get the corresponding books and resources. Identity authentication is the key to get the resources.

Now many companies open their own open API, and for the convenience of users, they mostly use the way of SDK document packaging. When calling, users only need to download the SDK document and call it according to the corresponding specification. In this way, the work of rewriting functions to encapsulate HTTP, HTTPS and other requests is saved, and more time is saved to do more valuable things.

I tried a lot of interface management tools on the market, including those that charge and those that don’t charge. Later, after development, my predecessors recommended a tool to generate SDK documents,eolinkerEnterprise version supports one click generation of SDK documents. I specially used it. I really like the interface style. It integrates interface document management, testing, and SDK document generation. Here, I can not only write and manage my interface documents, but also test them after writing. What’s more unexpected is that it can automatically generate SDK documents according to the interface information I wrote. I think about it for us from development to testing to calling, This greatly saves the tedious and meaningless working time in the development process, so that we can do more valuable work and focus more on the product itself.

However, there is a limitation in the generation of SDK documents. At present, it only supports the generation of PHP and JavaScript SDK documents, such as IOS and Android SDK, which are popular at present. If we can improve the two languages of the SDK, it is estimated that it will be more popular.

Do you prefer API or SDK?

Recommended Today

What is “hybrid cloud”?

In this paper, we define the concept of “hybrid cloud”, explain four different cloud deployment models of hybrid cloud, and deeply analyze the industrial trend of hybrid cloud through a series of data and charts. 01 introduction Hybrid cloud is a computing environment that integrates multiple platforms and data centers. Generally speaking, hybrid cloud is […]