1) What is an API?
API means application programming interface. Is a application code library that one application (for example twitter) provides for other application, so that those other application can interact with the application (eg twitter).
2) In the article the author compares Java API to Twitter API. What is the main difference between these two APIs?
Java API is a library that defines interactions with the database. For example, adding an item to a list etc. so what i understand is, you can chose function from this librabry to use for the API for you backend to frontend communication from this library.
Twitter API is a code library provided by twitters and it defines with wich commands you can do different things on twitter. So here the api provides commands so that your application (or any application) can interact with twitter.
3) The section in the article about abstraction is important, try to understand it and write down an abstraction from your daily life.
How i understand it, in the library you get a simple code âadd (e E)â to add an item from the frontend to the backend. If you had to code it from scrach you would have to code a lot of lines. But with the API you can take a short cut.
Lets say I pay with a card at a shop: first, i insert my card, the system than checks if this card is approved. The backend will ask to identify myself, the display shows enter pin. Hardware cardreade interface, sents the pin to the backend, which checks if the pin is correct. If the pin is correct the hardware transaction terminal shows âtransaction confirmedâ. I, as a customer just need to enter the pin, in the back there are various actions taking place (also checking if i have sufficient amount of money on my account). So exactly as i just enter the pin and confirm and a lot of actions are done in the background, i can just use an API command and a lot of actions happen in the background without me seeing it.