Web Api Performance Compared to MVC

I have an MVC web application and I am making a few ajax calls from the client to return json data. Now I just use MVC Action methods to return this data. I was wondering if I should use ASP.Net Web Api for them.

I understand that if I were building a REST solution, I have to use it.

But in this case, would it be justifiable to add additional complexity? Is there an increase in speed? I really don't need the content negotiation feature or OData support.

+4
source share
2 answers

According to the post here (and the reference that it refers to), the Web API is a bit faster. Web api performance?

+2
source

ASP.net Web api supports both JSON and xml. Web Api is designed to implement a leisure web service on top of an MVC application. This will add extra complexity to the application, but you will implement the api method associated with it in a separate controller.

Other web services are usually faster than regular SOAP web services.

In your case, if your customers just have a web client, you don’t need to implement web services. But if you need to exchange services for different clients (widows of applications, Windows services, third-party applications), use the recreation service using the web API

0
source

Source: https://habr.com/ru/post/1495632/


All Articles