1. What is SDK?

SDK: Concept: Software Development Kit (SDK, full name: Software Development Kit) is a collection of Development tools used by some Software engineers to build application Software for a specific Software package, Software framework, hardware platform, operating system, etc.

Commonly, it refers to a tool package provided by a third-party service provider to implement a function of a software product.

It’s a collection of apis and other files that you can use to get something done.

For example: The entire calculator product can be viewed as an SDK, which has an API set (calculator), documentation (instructions), and other files. What this SDK does is calculate, and I’m not sure what that means, but you can do it in one of the SDK methods to do that.


2. What is an API?

API: Concept: Application Programming Interfaces (apis) generally refer to predefined functions designed to provide applications and developers with the ability to access a set of routines based on a piece of software or hardware without having to access the source code or understand the details of the inner workings.

In fact, someone else has written a function to achieve a specific function, and you just need to provide a good interface, that is, call his method, pass in his specified parameters, and then the function will help you to achieve these functions.

For example:

Let’s say someone wrote a sum of numbers sum(int a, int b). It gives you an API — all you have to do is call the sum() function, pass in the values of a and b, and you get the result, and you don’t have to know how it’s implemented, you just have to know how to call it.

If someone else writes a method called Mul(int a, int b) to multiply two numbers, that’s another API.

For example, the image recognition API of Baidu Ai platform:




3. The difference between SDK and API

1. An API is a concrete function, a defined function, whose purpose (such as addition) has been defined. 2. The SDK is like a collection of methods, a toolkit.


So if you want to add, you call the addition API of the SDK, if you want to subtract, you call the subtraction API, whatever you want to do, there’s always a way in the SDK to do it.

3. In addition to the perfect interface provided by SDK, it will also provide you with the relevant development environment, and you have to provide the environment required by API (such as passing parameters).

4.SDK is equivalent to developing integrated tool environment, and API is data interface. Call the API data in the SDK environment. (This SDK can be configured or downloaded by a third party.)



API

A channel through which the front end calls the back-end data is called an interface. Through this channel, you can access the back-end data without calling the source code.

SDK

The SDK is a collection of documents, examples, and tools that engineers use to help develop certain kinds of software. The SDK can improve the development efficiency and make it easier to access certain functions.

For example: if a product wants to implement a certain function, it can find the relevant SDK, and engineers can directly access the SDK, so there is no need to develop again.


How to choose API and SDK interconnection

But here’s the problem again. API and SDK are the two product docking methods, which one is better?

API and SDK connection, fit is the most important. There is no best, only the most suitable.

The API and SDK ultimately achieve the same functions, and which one to use depends on the requirements of the docking platform (confidentiality, special requirements, development costs, etc.).

Select the API

Advantages: Low cost API development, easy docking, can quickly verify the business model and user experience.

Disadvantages: THE API passes through the docking platform, and manufacturers can obtain the relevant data information of the docking platform.

Select the SDK

Advantages: After the SDK is connected, the functions are stable and the response speed is fast. In addition, the data related to the connected platform is not obtained.

Disadvantages: There are many links to be developed, heavy development workload and long docking cycle.

Therefore, in the actual development process, if only simple function call, or use API faster and more convenient; In most cases, it is safer to use the SDK if it is a complex feature.