Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angularjs + ASP.NET MVC + ASP.NET Web API

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?

like image 396
Haider Avatar asked Apr 13 '14 21:04

Haider


1 Answers

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.

like image 155
Rowan Freeman Avatar answered Oct 18 '22 22:10

Rowan Freeman