13

I am planning to build my new web application. I am good at ASP.NET MVC and jQuery and have working knowledge of Web API too. I am new to Angularjs but I want to use it on client side for complex pages which requires DOM manipulations. I have the following concerns:

  1. Should I still consider Single Page Application framework after knowing that it would be a medium scale application with many pages and complex logic/algorithms.
  2. I heard people talking about replacing ASP.NET MVC + jQuery completely with ASP.NET Web API + Angularjs. Is it really a better choice for medium or large scale web applications with complex logic. If yes then what is the alternate for session, authentication etc.
  3. Would it be a wise decision to use ASP.NET Web API, ASP.NET MVC and Angularjs together.
  4. What is the compatibility between latest versions of jQuery, Bootstrap and Angularjs.
  5. Would the development time/cost increase with using Angularjs + SPA instead of ASP.NET MVC + jQuery (Non-SPA).

Has any body written a medium/large scale complex web application using Angularjs?

Haider
  • 1,488
  • 2
  • 15
  • 29
  • Your questions all depend on your familiarity with the tools. For instance, if you don't know JavaScript it will be increasingly more difficult. – PW Kad Apr 13 '14 at 21:48
  • I just updated the question. I am good with jQuery too. sorry for not mentioning it before. I have been working with ASP.NET MVC and jQuery. I have gone through the official tutorial for Angularjs on their website which also looks easy but too basic. – Haider Apr 13 '14 at 21:55
  • Do you mean Angular is too basic or the tutorials are too basic? Angular is [anything but basic](http://docs.angularjs.org/api). – Rowan Freeman Apr 14 '14 at 02:42
  • Might want to see http://superdevelopment.com/2013/12/16/building-rich-web-apps-jquery-vs-angular-js/ Author prefers Web API + Angular. – nawfal Nov 19 '14 at 20:56
  • its simillar to: https://stackoverflow.com/questions/29919834/asp-net-mvc-and-angularjs-together-asp-net-web-api – Danilo Breda Jan 04 '16 at 03:05
  • Hi @Daniloloko, This question is 1 year older than the question you mentioned. So perhaps that question is similar to this one :). – Haider Jan 04 '16 at 16:21

2 Answers2

16

Should I still consider Single Page Application framework after knowing that it would be a medium scale application with many pages and complex logic/algorithms.

I don't have much experience with SPA. MVC isn't really designed to solve the problem, but AngularJS would work very well with the approach. You won't have any difficulties here that I can see.

I heard people talking about replacing ASP.NET MVC + jQuery completely with ASP.NET Web API + Angularjs. Is it really a better choice for medium or large scale web applications with complex logic. If yes then what is the alternate for session, authentication etc.

Replace jQuery with AngularJS except for those rare times where jQuery does something that Angular cannot. In my experience I only use jQuery for rare DOM selection situations.

Angular JS is very good at seperating concerns, data-binding, seamless UI updating and encouraging good programming practices such as IOC/dependency injection and SOLID.

WebApi doesn't replace MVC as such; but what you should be doing is using WebApi where it makes sense. That is, any time you're making asynchronous (AJAX) calls with Angular, it should interact with a WebApi back-end. Simple Get/Post stuff.

Would it be a wise decision to use ASP.NET Web API, ASP.NET MVC and Angularjs together.

Absolutely. I encourage it.

What is the compatibility between latest versions of jQuery, Bootstrap and Angularjs.

Bootstrap depends on jQuery. Angular doesn't. They all work flawlessly with each other. I use them all (but I don't directly interact with jQuery much).

Would the development time/cost increase with using Angularjs + SPA instead of ASP.NET MVC + jQuery (Non-SPA).

AngularJs has a learning curve and isn't as simple as jQuery. That is, it isn't quite as pick-up-and-go as jQuery.

It is more time consuming at first but I think over time the ease of debugging, forced code separation and better practises means that Angular is more robust, more flexible, less code, more code reuse, and so on.

Please note that while I'm a fan of AngularJS, other javascript frameworks such as Ember, Backbone, Knockout and so on are, I'm sure, just as great. Personal preference/experience.

Community
  • 1
  • 1
Rowan Freeman
  • 15,724
  • 11
  • 69
  • 100
  • I am used to with generalizing the code by using shared/common methods/properties in base controller or in pre/post execution events of actions in controllers, would I have to do all that in javascript considering web api will only be responsible for data? Also, how can I utilize session in SPA which I often use for managing my server side stuff. – Haider Apr 14 '14 at 10:04
2

Im in a similar situation, but Ive started see the way through the "fog" with using these newer frameworks such as AngularJS when used together with MVC. Ive been going through several online tutorials on Pluralsight and have come to agree with one of the authors, Shawn Wildermuth who recommends using a "combined" approach when considering the SPA concept. Basically, limit the "SPA pages" to only those that warrant it, otherwise use MVC views etc.

bitshift
  • 6,026
  • 11
  • 44
  • 108