locked
MVC Vs Web API Angular JS RRS feed

  • Question

  • User435149036 posted

    Hi All,

    I was researching the best pattern to implement in our new project. As you know Angular JS is the hottest cake. So we thought we would implement that. But Angular JS provides the same kind of mechanism like Model and Routing. These are already there in MVC. Only difference is that these things are server side. Why do we need to follow ANGULAR JS MVW model? I could only see the advantage if we create webapi to serve JSON response then on top of that create HTML 5 application using ANGULAR. But can't we create ASP.NET MVC application using ANGULAR without redoing what asp.net is already doing?

    Thanks

    Tuesday, November 4, 2014 7:40 PM

Answers

  • User-821857111 posted

    As you know Angular JS is the hottest cake.

    That's no reason to implement it. It's primary use is in Single Page Applications. Is your new project an SPA? If not, you shouldn't necessarily try to shoe-horn Angular JS into it.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, November 5, 2014 2:22 AM

All replies

  • User-821857111 posted

    As you know Angular JS is the hottest cake.

    That's no reason to implement it. It's primary use is in Single Page Applications. Is your new project an SPA? If not, you shouldn't necessarily try to shoe-horn Angular JS into it.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, November 5, 2014 2:22 AM
  • User1751268424 posted

    Hi,

    Why do we need to follow ANGULAR JS MVW model? I could only see the advantage if we create webapi to serve JSON response then on top of that create HTML 5 application using ANGULAR. But can't we create ASP.NET MVC application using ANGULAR without redoing what asp.net is already doing?

    If you want to see and experiment the different, use your old application. But like the previous reply you can do it with your new project, from here also you can get the benefit of using AngularJS.

    It is not always using AngularJS, in my case for a simple CRUD and it maintain not frequently still better use ASP.Net MVC, because optimization is not a concerned.

    Have fun.

    Wednesday, November 5, 2014 2:51 AM
  • User435149036 posted

    Hi ,

    Thanks for your reply. and sorry i could not reply as i was on vacation. So i could understand if the project is new and utilizes SPA then we should go ahead with AngularJs and WebApi. But is there any advantage in using Angular in MVC? 

    Thanks In advance.

    Tuesday, December 2, 2014 12:55 AM
  • User-821857111 posted

    If you want to create a single page application using ASP.NET MVC to act as a data service, then you can use Angular in your views.

    Tuesday, December 2, 2014 2:14 AM
  • User435149036 posted

    Thanks Mike,

    I know that. but my question is should i? ours is a SPA. So we are thinking best possible approach to handle. i think ASP.NET and Angular is not a good solution. What would be the best solution in your opinion. ASP.NET MVC or angular with WebApi? Also it is a new project so we are pretty open to anything, Please let me know if i have any misconception.

    Thursday, December 4, 2014 3:42 PM
  • User-821857111 posted

    I can't give an opinion. I've never used Angular.

    Thursday, December 4, 2014 4:36 PM
  • User435149036 posted

    Thanks Mike for your response. Is anyone else having any ideas? Please let me know

    BR,

    Anirban

    Friday, December 5, 2014 12:17 PM