Click here to Skip to main content
15,903,362 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How can we create Base of any project with MVC and AngularJS.
Posted

1 solution

The best architecture for it is not to use MVC. Use WebAPI instead, and let Angular handle your views. That's the point of it.

Trying to mix the two makes specific delegation of responsibility difficult. MVC takes data from the back-end and renders a view with it via Razor. Angular takes data from wherever and renders a view on the client via HTML. Both do the same thing, just one on the client and the other on the server.

Ultimately it has more to do with which space you're comfortable working in.

If your department has the JavaScript chops for it, using Angular to completely handle your UX is a better solution. It is faster, completely modular, and can use external resources with less effort.

If your comfort levels or policies dictate using more c# than JS, stick with MVC and do not use Angular, since it's almost completely redundant in that scenario.

Just to note: I have a specific project that I've implemented in MVC, MVC/Angular, WebAPI/Angular, and ultimately a custom OWIN implementation/Angular. Of each of these implementations, MVC/Angular had the worst performance, was the most complicated, and took the longest time to code.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900