We have probably seen the term API many times in the updates of the operating system, the web browser, or sometimes the applications announce new APIs for the developers, but what is really an API?
We can weigh in an API like in the menu in a restaurant, this one offers a list of dishes that we can order along with a description of each one. When we ask for the ones we want, the kitchen of the restaurant provides them, although we do not know how that food is prepared, nor do we care.
Well, similarly an API lists a set of operations that developers can use together with a description of what they do. Thus, the developer does not need to know how, for example, an operating system builds and presents a dialog box, you just need to know that it is available to use in your project. Of course, in this case, developers may have to provide their own data to the API to obtain the results, so it would be more like a luxury restaurant where we can provide our own ingredients with which the kitchen will work.
Therefore, APIs allow developers to save time by leveraging the implementation of a platform to perform their development, which helps reduce the amount of code that needs to be created. In addition, they help create more compatibility between applications of the same platform, since, among other things, they can control access to hardware and software resources.
APIs make life easier for developers
For example, if we want to create an application for iPhone, Apple’s iOS system provides a large number of APIs, like any other operating system, to make the work easier. So, if we need a web browser, we will not have to program our own from scratch just for our application, since the “WKWebView” API is used to embed a browser object ( Safari ) in the app.
At the same time, if we need to capture photos or videos from the iPhone camera, we will not have to write our own camera application, Apple provides a camera API so we can embed the iPhone in our project.
Therefore, if the APIs did not exist, the application developers would have to create their own camera software, for example, and interpret the hardware entries of the same, but thanks to the work of Apple’s operating system developers, the creation of third-party apps is much simpler, in addition to gaining quality and integration with the system itself.
Of course, this applies to all platforms, with special emphasis on Windows or Android. In addition, these APIs are also used to control access to hardware devices and software functions that a third-party application does not have permission to use.