Web application:
This is a complete solution for the user. This means that the user can:
- Open it using a browser
- Interact with that. He can click on something and after some processing his result will be displayed on the browser screen. Human-System Interaction
Web API
Only using the web API, the user cannot interact with him, because he returns only data, not views.
- This is a system that interacts with another system.
- It does not return views, it returns data
- He has a set of endpoints that other systems can use to retrieve the data that he provides.
Explanation Using ANALOGUES
Web application:
Suppose we have a cook. We can ask him to cook us anything, anytime! Suppose we ask our cook to make us a hamburger. He will process our request and provide us with a burger. (This is similar to a web application; complete solution.)
Web API
Now, if we ask him to cook us a McDonald's hamburger, can he cook and bring us this? Not! Here comes the concept of the API! (in this example, suppose McDonalds gives takeaway only)
McDonalds-Takeaways is like an API. That allows other systems (cooks) to hit and return the necessary data. So we can ask for our solution (our cook)
- go takeaway McDonalds
- Buy a burger and bring us this
So what happened, we asked our "System" to talk to this McDonalds-takeaways (API System) and return the desired result.
source share