Preface series of articles >>>
Our series of articles , It's all about how to complete an intelligence “ Space kissing machine ” Development of . I hope it can help the long-distance love or Exotic lovers ！
In this article, we will explain in general API And SDK Let's introduce the definition of ~
One 、API：Application Programming Interface, Application programming interface
Let's start with a country （ke） Occasion （yi） Accustomed to （tiao） example （guo） The Encyclopedia of ：
API（Application Programming Interface, Application program interface ） Are some predefined functions , Or it refers to the agreement on the connection of different components of the software system . A set of routines that applications and developers can access based on a software or hardware , Without access to the source code , Or understand the details of the internal working mechanism .
Let's illustrate it with a few examples ：
give an example A：
Just Howard Of “ Space kissing machine ” In terms of prototype , Suppose we put APP Leave it to the supplier , So if the supplier wants to get the data in the device , We need to provide a API, Enable suppliers to access directly without knowing the configuration of the device . The pink frame part is API~
give an example B：
Take an example from life . Your man / Your girlfriend bought you a cup of milk tea （ Here we recommend the sweet dew of Yangzhi , It's delicious ）, So you want to drink what's in it （ Although you don't know what's in it ）, You can use a straw to drink . This straw is API.
give an example C：
Imagine , You need to boil water at home . Then your steps are as follows ：
- The kettle is full of water ;
- Plug in the plug
- Press the water switch
- Wait for the water to boil .
In the process above ,API Even if the plug in your house , As long as you plug the kettle into this socket , You can use the electricity provided by the power station （ If there is a mistake , Please advise ）.
OK, Through the above three examples , I guess people are right about API There should be some understanding .API We can see it everywhere in our life , Welcome to give more examples in this article .
So in the Internet of things , Next , Let's introduce it SDK
Two 、SDK：Software Development Kit, Software development kit
countries （ke） Occasion （yi） Accustomed to （tiao） example （guo）：
Software development kits are some that are used by software engineers for specific software packages 、 software framework 、 Hardware platform 、 A collection of development tools for creating applications such as operating systems , generally speaking SDK I.e. development Windows Platform applications used by SDK. It can simply provide an application program interface for a programming language API Some of the documents of , But it may also include complex hardware that can communicate with an embedded system . Common tools include utilities for debugging and other purposes .SDK It also often includes sample code 、 Supporting technical notes or other supporting documents to clarify doubts for basic reference materials .
Let's give another example .
give an example A：
Suppose we “ Space kissing machine ” There is already one App.App In order to get the location information of users , Built in application of a map , So every time lovers turn on APP When , There will be the following 3 A process ：
- couples A open “ Space kissing machine ”App;
- “ Space kissing machine ”App Wake up the built-in map app ;
- Map application feedback user location information ;
- Couples can see each other's location .
In the above process ,“ Space kissing machine ”App The built-in map app , That's what we're talking about SDK.
SDK It's easy to understand , Let's not give so many examples . If you have more accessible examples , Leave a comment below ~
3、 ... and 、API and SDK The relationship between
API and SDK, In an end-to-end development , Has a very important position . Again , Let's use an example to illustrate their relationship ~
This time we won't use our “ The kissing machine ” Here's an example , With “ Lego ” Take an example. ：
API： Lego building blocks “ Grain ”（ To connect two Lego blocks ）;
SDK： A big bag of Lego blocks , There are all kinds of gadgets in it
adopt API and SDK, To complete a complete LEGO ！
Hope through this article , It can make people understand API and SDK There is a simple and crude understanding of ！