Asp.net mvc vs Angular JS for application development

What I understand:

Asp.net MVC is used to develop applications that process the request on the server. It also provides browsing. But ultimately, it displays the view on the server and sends simple HTML to the user.

Angular JS, on the other hand, does not do any processing on the server. It serves only for HTML or JavaScript files for the client, and then the client executes these files. angular An application expects only data through services that run on the server.

My question is:

If angular does not cause server-side processing load at all, why not always use it to develop applications on the front panel and on the server, why not use some service (for example, web API or WCF) instead of MVC? In short, why do we need a processing infrastructure for the side view of the server, instead we can have a service on the server and an angular application on the client?

+7
source share
1 answer

Both ASP.NET MVC and AngularJS have their own goals and advantages. As is the case with your specific question, AngularJ is better suited for SPA (single-page applications), where ASP.NET MVC is a full-fledged server application that can contain WebAPI, a routing mechanism, and HTML-generating views.

The reason a server application such as ASP.NET MVC is always preferred is because it satisfies all the basic needs, while AngularJ is in many cases the ideal solution. It gives a seamless user experience for web applications. In addition, AngularJs is not very consistent, as it depends on the user's browser, which varies greatly and can lead to conflicting results. Thus, a server-side application is always the best fallback option to ensure that the primary purpose of the user is complete.

+6
source

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


All Articles