Discover what an API is!

Image for post
Image for post
[Sourcerer profile: https://sourcerer.io/ciaraburkett]

Nowadays, computer programming has become essential to create all kinds of software and applications. The evolution of computer languages has led to many programming methods to design more robust and modular software.

An interface concept

This method is based on a concept known as the “interface” principle.

To introduce this principle as well as possible, we will use an example from everyday life, the remote control. When you watch television, you have several options: turn off, turn on the television, change channels, increase the volume.

To perform these actions, you use remote control. This remote control takes care of transcribing your actions, through an interface, itself by your television set.

The principle of an API is the same. The developer will then interact with a server to retrieve information through predefined actions.

Why use APIs?

First of all, it is essential to know that many websites use this method to have the possibility to change their interfaces without affecting the logic of their website. Indeed, one of the main advantages of using an API is the dissociation of your user interface and your logic (the engine of your site). It will be easier for a developer to change the technology he uses to render his user experience when using an API.

Secondly, the possibility of interconnecting services between them is also one of the reasons why developers use this process. With the growth of the Internet, services have multiplied, and the possibilities are endless.

What you need to know is that most online software and services provide an API. This allows them to grow their businesses while offering the integration of their services into other developers’ programs. For example, when you create an account on a site using your social network credentials.

What if you already use it?

To give you a concrete example, let’s take the site of your mailbox. This site provides access to a login interface that contains a form to send and log in to check your emails.

It is very likely that this form will be created through an API. Once you have entered your login details, when you click on the “connect” button, a request is sent to the server which will check the relevance of your information and send you a message “you can connect” or “wrong login details”.

To conclude

  • In a world where the current subject is data protection, APIs will allow you to let the user access your data in a controlled way.
  • You want to create several similar sites, but you don’t want to duplicate your code? APIs are made for you.
  • You want to create a company that offers a service, but don’t want to create your software? Create an API and put it on sale there so that other programs can use your services.
  • If you want to develop an adjustable and easily modular program.
  • If you want to dissociate the user interface of your program logic.

Hopefully, when you click on a button, you will think twice about how it works.

As you will have understood in this article, APIs still have a bright future ahead of them.

If you want to read more content like this, you can follow me on Twitter where I share content about programming, self-development and other advice to reach your goals as a developer!

Written by

💻 Full Stack Developer — 🐦 Twitter: twitter.com/gaelthomas _ — ✍️ Blogging on herewecode.io/blog/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store