1 Introduction to APIs
This chapter covers...
- What are interfaces?
- What are APIs?
- What is resource orientation?
- What makes an API “good”?
Chances are that by picking up this book, you’re already familiar with the high-level concept of an API. Additionally, you probably already know that API stands for Application Programming Interface, so the focus of this chapter will cover in more detail what these basics actually mean, as well as why they matter. So let’s start by looking more closely at this idea of an “interface”.
1.1 What are interfaces?
Whether we know it or not, we use and rely on interfaces every day, so much so that if they didn’t exist we would have a pretty tough time surviving. For example, the USB port that we use to charge our phones is an example of an interface that most of us would have a hard time living without. The outlets that supply power to our homes are another interface we deal with daily and one which happens to vary depending on where you live. The pipes that bring water to our homes so we can shower and cook are another example of an interface. But not all interfaces are as familiar as the ones we see around the house and in our electronics.