đ Understanding What an API Is
đ€ The Meaning of API
Letâs go over the definition of what an API is. API is an acronym. An acronym means a bunch of letters, and those three letters in API are A, P, and I. Each one of these letters stands for a word:
- A stands for Application
- P stands for Programming
- I stands for Interface
đ§ Breaking Down Each Word
đ§© Application
Now, what does each one of these words mean?
Application means a piece of software that does a task.
For example:
- eBay has software that sells you items.
- Pandora plays music.
- WAZE provides you with directions.
- Skype provides you with conversations.
- Google provides you with search results.
These are examples of pieces of software that do tasks for you.
đ§ Programming
And how do they do these tasks?
They do these tasks through programs. So, programming is the program that does the task within the application.
For example:
- The Pandora application uses a program to play music for you.
- It doesnât just do it by itselfâyou have to run a program, the âplay musicâ program, to play the music for you.
đ§ Interface
And lastly is interface.
Now, what is an interface?
Interface is a place where you can tell that program to run within that application.
đ± Examples of Interfaces
So what are examples of interfaces?
Well, on your cell phone, you have appsâand each one of these apps is actually an interface. Think about it.
For example:
- I have the WAZE app that provides me with directions.
- By using this WAZE interface, when I click on this app, I use this interface that tells a program to run in the WAZE piece of software.
- That program will give me back directions.
Another example:
- Google Translate.
- I have it hereâthis is my interface, the Google Translate app.
- I put in a word and say I want it translated in Spanish.
- That word then gets sent to a program in a Google server somewhere, and that program sends me back the translation.
So each one of these is actually an API interface. Interface is a place where you tell the program to run. And hereâs a place where we can tell the program to run for us.
This is an example on my cell phone.
đ» APIs Beyond Mobile Phones
But there are other examples of APIsânot just on your cell phone, but everywhere.
For example:
- If you have a computer and you want to do a Google search, you have the interface that is the search pageâthe Google search page.
- From this interfaceâthe Google search pageâyou tell Google (that is, the Google application) to run a program which does the search for you and provides you back the web page with results.
đ Reversing the Acronym: IPA
You can look at it not just as API but as IPAâlook at it the other way around.
If you look at it the other way around and start with the interface:
- You start with the Interface (I), and at the interface is where you tell a Program (P) to run in an Application (A).
Right?
So thatâs what an API is.
đ What Makes APIs Great?
â 1. You Donât Have to Write the Program
What are the advantages of APIs? What makes them so great?
Because they are great.
Well, firstâyou donât have to write the program. You just use it.
Alright?
For example:
- I have my Pandora app to play music here.
- Here is my interface right here to tell Pandora to play music for me.
- And I donât have to write the program to play music.
- I donât have to pay the artist fees.
- I donât have to do any of this.
- All I have to do is just say, âHey, run the program to play music.â
đ 2. Platform Independent
Letâs look at another reason that makes APIs great: itâs platform independent.
In other words, you can run this interface from anywhere.
For example:
- I could download this Viber app on my cell phone.
- I could also download the same Viber interface on a Windows computer or an Apple computer.
So whatever platform youâre onâwhether itâs a cell phone or itâs a computer or whatever it is that you haveâyou can still run this program.
You just tell the program to run.
So it doesnât depend on where itâs coming from.
You just tell it to run.
đ§ 3. Upgrade Safe
And the third thing that makes APIs great is that itâs upgrade safe.
You donât have to worry about the upgrades because technology is going so fast.
This cell phone is going to beâsayâitâs new today, in two years itâs going to be old. Right?
Thatâs how fast itâs going.
They need to upgrade the program.
You donât have to worry about that.
đ§âđ» A Note on API Usage in Tech
Now, one more thing I would like to go over is that when people talk about APIs, theyâre generally not talking about simple APIs.
Now, these are all APIsâApplication Programming Interfaces.
These are places where you tell a program to run in a piece of software.
However, when people talk about APIs, theyâre generally talking about going to the interface where the server is located that runs the program.
đ„ïž Server-Based APIs
For example:
- This Google Translate appâitâs real easy to use because the interface here is located on my cell phone.
- But when people talk about APIs, theyâre generally talking about this interface not located on my cell phone.
- I would have toâif itâs the Google Translateâgo to the Google server and call the interface at the Google server.
And the reason why they say APIs have to be located at the server level is because in the technology world, unfortunately, we have a lot of geeks and we want to try to make it complicated.
But itâs not really complicated.
đ Final Thoughts
APIs are great, and Iâm excited that youâre learning about them.
They allow you to interact with powerful programs without needing to build them yourself.
Whether on your phone, your computer, or through a server, APIs are the bridges between you and the software that gets things done.
Top comments (0)