8

What I understand:

Asp.net MVC is used to develop applications that processes request at server. It also delivers view. But ultimately it renders the view at server and sends plain HTML to user.

On the other hand, angular JS does not do any processing at server. It only serves HTML or JavaScript files to client and then client executes those files. Angular Application only expects Data via services that run on server.

My Question:

If at all angular does not cause any server side processing load, why not to use it always to develop front end application, and on server why not to use any service (Such as web API or WCF) instead of MVC? In short, why do we need to server side view processing framework at all, instead we can have service at server and angular application on client?

k11k2
  • 2,036
  • 2
  • 22
  • 36
Aditya Bokade
  • 1,708
  • 1
  • 28
  • 45
  • All technology/framework have its own purpose and it depends how you want to use it. Your question is essentially asking: "I can cut a coconut into half by using a knife, an axe or a chainsaw. Why does it matter if I only use one of it or a combination of the tools available?" – Zephyr Aug 02 '17 at 12:38
  • Not sure if the question is duplicate but [here](https://stackoverflow.com/questions/23076670/asp-net-mvc-5-vs-angularjs-asp-net-webapi) we can find much more complete explanations on the topic. – ZenVentzi Dec 06 '17 at 19:14
  • Possible duplicate of [ASP.NET MVC 5 vs. AngularJS / ASP.NET WebAPI](https://stackoverflow.com/questions/23076670/asp-net-mvc-5-vs-angularjs-asp-net-webapi) – ZenVentzi Dec 06 '17 at 19:17

1 Answers1

6

Both ASP.NET MVC and AngularJS has their own purposes and advantages. As with your specific question, AngularJs is better for SPA (Single Page Applications), where as ASP.NET MVC is a full fledged server side Application which can contain WebAPIs, Routing engine as well as HTML emitting Views.

The reason why always a server side application like ASP.NET MVC is preferred first is that, it caters all basic needs, whereas AngularJs in many cases is cherry on top of the cake. It gives a smooth user experience for web applications. Also AngularJs is not very consistent as it depends on the user's browser which varies a lot and could lead to inconsistent results. So a server side application is always the best fallback to make sure the user's basic purpose is fullfilled.

Habeeb
  • 7,601
  • 1
  • 30
  • 33
  • So you mean that for a basic application we should use asp.net mvc and for complex UI application we should prefer angular +service? Or we should develop application in combo of Angular and Asp.net mvc? If so, why we will render view using MVC since angular can do it? – Aditya Bokade Aug 02 '17 at 11:17