Doc on API, SDK and Library | DAFTCRAFT ENGINEER BLOG
In one of our meetings, we all heard the words SDK(Software Development Kit), API(Application Programming Interface), and Library more than usual. After listening to those words we got a question in mind “What is the difference between SDK, API, and library”. So here I am today to share my knowledge about SDK, API, and Library.
What is SDK(Software Development kit)
As the name only says, it is a tool kit for software developers. This tool kit includes a variety of tools helpful for software development. This SDK differs from platform to platform. These are provided by different hardware and software vendors. SDK not only includes development tools, the good SDK includes everything from framework to debugging and testing tools. Some SDKs include hardware access to the controllers and sensors as well. These SDKs also have documentation so that developers can easily read and use the SDK.
In general, SDK includes the following;
④Libraries and APIs
Above listed are the basic components a good SDK will have. Some of the SDKs will have a basic or test project ready to help the developers get started as quickly as possible. Some examples of SDK are Java development kit(JDK), Android SDK, Mac OSX SDK, Unity Ads SDK and many more.
Figure 1. Software Development Kit (SDK). The above figure shows the general tools that are present in SDK which can be used by the developer.
( Source: https://www.mobileapps.com/wp-content/uploads/2021/06/Image-124-1.jpg)
What is API(Application Programming Interface)
API(Application Programming Interface) is a piece of software that helps in the communication of two applications. In simple words we can say, it is like a bridge between two applications, that need exchange of information within each other or need to be communicated. Here, Application is a software with different functionalities and the interface gives service between the two different applications with the help of request and response.
Figure 2. Application Programming Interface(API) working
Let’s take an example of a food delivery application. In that a customer selects a food from a restaurant and orders it. It needs to be delivered to the address given. The process of searching for food, and placing an order will take place from a customer’s end and receiving the request and packing a food will take place by service provider’s end. Here, API’s work is to guide the delivery person towards the proper way and make sure it reaches the customer on time. In here the Google Maps API comes into picture. Some examples of API are Google Maps as we saw in the above example, Travel booking, Weather Snippers, Pay with PayPal and many others.
What is Library
Library is the collection of data and programming code which is used by the programmer to write the optimised code. The library has reusable and precompiled files, scripts and functions in it that can be referenced by the developers for the application development. The library cannot be executed independently. It needs to be combined with the other program to work dynamically.
Every programming language has its own libraries for the different functionalities. For example, writing mathematical functions in programming language from scratch and getting a proper result is a painful task, So instead of writing a code from scratch, the developers choose to use the libraries, which are already created and reusable. It will reduce the time and also give a proper result. Some examples of libraries are Numpy, TensorFlow, Keras, jQuery and so on.
From the above explanations and diagrams we can say that SDK is the pack which contains API and libraries in it and API is the pack that can contain some libraries in it. But it is not necessary that all the API contains libraries in it and the Library is just a collection of several functions and methods in it.