What is the difference between web application and web API?

It sounds naive by ear, but how different are the web applications and the web APIs when someone mentions this in their article? How different are they from their functions?

+10
source share
5 answers

Very briefly: a web application is a website that you see in your browser, and a web API is a service that you use in a web application.

See Also Difference between ASP.NET MVC and ASP.NET Web API :

Asp.Net MVC is used to create web applications that return both views and data, but Asp.Net Web API is used to create full-fledged HTTP services in a simple and simple way that returns only data, not views.

+12
source

Web applications are designed for their interaction with people through representations, while web APIs, as well as web services, are designed for interaction between systems (programmatic information exchange). They exchange data.

+4
source

A web application is a website that runs on your browser and Api web service.

+1
source

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.

0
source

Simply put, the web application’s response to the requests is html, css, javascript and everything the browser can display (graphical), while the web API returns non-graphical β€œdata”. Having said that, I think we can make the web API work like a web application, because HTML is still data.

0
source

All Articles