Angularjs – benefit of using angular js on top of asp.net mvc

angularjsasp.net-mvc

Is there much point to using angular js on top of asp.net mvc since they're kind of both doing the same thing? What are the advantages to using angular over asp.net mvc + jquery? What kind of scenario would you pick angular in? If you do pick angular in a microsoft environment, what would you run on the server side? Would it be something like Web API? Or is there still benefit of using traditional asp.net mvc?

Best Answer

This question is a bit subjective, however here was our reasoning.

  1. Let the client handle rendering of pages, free up resources on the server.
  2. Leverage built in caching of cache servers since we are just dealing with <html/> content.
  3. Since the pages are cached the only traffic back and forth is json payloads.
  4. We have been using NancyFx, but WebAPI or Service Stack would work just fine.
  5. We wanted to build a responsive single page application and AngularJs fit the bill for testability as full feature rich framework.
  6. AngularJs forces you into a pattern that we needed for JavaScript, in the past our jQuery heavy applications turned into functional spaghetti (That was our fault but being guided by Angular helped out a lot).

As with all frameworks pick the one that suites your needs