0

I Have a question regarding those 2 techniques, if I'm going to use both techniques in my project doesn't they clash?

for example, they both use the MVC model. So if I use the angular routing isn't the ASP.net MVC routing unnecesarry than?

Is it a smart move to only use ASP.net to create the WEB API and the other backend processing, and angularJS to implement MVC and talk to the API

any suggestions?

1
  • This is really a subjective question. Every project using both technologies you describe will use different features from each, and it's impossible to make a blanket "this is the only right way to do this" kind of answer. Commented Oct 12, 2015 at 17:00

2 Answers 2

1

You shouldn't have to worry about them clashing if done correctly. Your bigger concern should be the additional and redundant work it may cause. For the large majority of situations, having Angular interact directly with WEB API is favorable because it eliminates a layer and makes your UI completely portable between technology stacks.

There are merits to the hybird approach though that are concisely expalined here: https://softwareengineering.stackexchange.com/questions/209735/mixing-angular-and-asp-net-mvc-web-api

Sign up to request clarification or add additional context in comments.

Comments

0

The two can complement each other. MVC routing only kicks in when you make a server request. So long as no HTTP request to the server is made, then MVC routing doesn't kick in. I use the server for returning "dynamic content" that depends on some server resident information. You can fetch modals from the server as Partials. Using the Server for mostly API work is however advisable.

There is a project called TwitterBootStrapMVC (https://www.twitterbootstrapmvc.com/) That enables you to render pure bootstrap markup on the server and deliver it to angular after some "post processing". It is handy and works well with Angular.

Comments