Intro
Last updated
Last updated
API, HTTP, JSON, REST. You have probably seen and/or heard of these acronyms. That's because they are extremely important and foundational to becoming a modern software developer. Our aim in this program, in fact, by the end of this book, is to help you gain familiarity on a theoretical and practical level with these items. Our hope is that by the end of this book, you'll be comfortable with using APIs, and understand JSON and HTTP better.
Let's study the whole 'full stack' process at a high level with an initial diagram. We'll be using this diagram to explain how HTTP, JSON, and APIs work. Take a look:
Let's start by looking at APIs. We'll take it from a theoretical perspective for a little while here, so there is some reading ahead.
API stands for Application Programming Interface. Essentially, they function as a junction between the client-side and server-side. Think of APIs as an electrical outlet: The power cord from your computer is the client, while the electrical grid behind the wall is the server. APIs allow the client to access all of the hard work done in the server without having to know what exactly the server is doing. So, in our example, the power cord doesn't need to know all of the electrical grid information, it just needs to know where to connect to get the electricity it needs.
In addition, many applications utilize more than one language to function. For instance, an application might have a client written in React or Angular with a server that is written in Java, C#, or Node.js. The API can function as a bridge between those languages.
The API provides information from the server to the client that is requesting it. We'll dive deeper into how this works.