I wouldn’t ELI5 this. If you want to be a webdev you should learn this in the following order:
Networking (TCP/IP, UDP, HTTP, DNS) and then something on abstract classes/interfaces and then you should be equipped to understanding this topic quite intuitively.
Analogies are confusing in this sort of environment, and web APIs are really closest to abstract interfaces which get implemented by classes.
ELI5 attempt: An Interface is a contract to deliver a certain thing when requested a certain way. It’s a sort of menu that says “if you provide me with these inputs, I’ll return this as an output”. When we talk about Web APIs, we’re talking about menus that you order from over HTTP. You pass data in, in a way the API expects, it processes it and then sends you back new data. It’s sort of like ordering a pizza between software applications.
Latest Answers