š 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)