Suppose I’m replacing the kitchen in my house. I start by ripping out everything that is in there so I just have bare walls. I order wood, nails, screws and the other stuff I need to put the new kitchen in, and I use my tools to assemble them into cupboards, counter tops, cupboard doors and things. But then I need to put a fridge and a dishwasher in the kitchen too. In theory, I could order metal, paint, pipes and all the other stuff and build a fridge from scratch, and build a dishwasher from scratch. But instead, I know that there are factories out there that can build a fridge and build a dishwasher far better than I can, for a far lower cost. So i go to the store and buy a fridge someone else has made, and I buy a dishwasher someone else has made, and then all I have to do is find the right electric plug and plumbing connections for water for the dishwasher, connect them up, and I have a fridge and a dishwasher in my kitchen.
This is like building a computer program. Some of the things I want to do myself. I want to have the freedom to customise certain parts of the program to do exactly what I want. In my kitchen I want a specific layout of cupboards and counter tops. So I make those parts myself. But then there are the complicated and hard to make things. An API is a system in a computer that lets me connect up to something someone else has made, that provides a set of functionality far easier and more efficiently than I could ever do myself. An API is essentially a way to connect to something someone else has made. It is like the doors on the fridge or dishwasher and the electrical and plumbing connections. I know how to connect to it, and I know how to get out of it what I want, but I don’t need to understand what is going on inside.
Latest Answers