2

I am confused in a scenario for my upcoming project.

The project has web API's written which can be called by web-apps or mobile apps.

I want to make a webapp using Angular2 for which I can see two approach
a. Use only Angular2 with Angular CLI and consume web api's
b. Use Angular2+Asp.net MVC5 together and consume web api's

both will end in making same thing but is there any advantage of one over another.

Here's is an image describing what I want to say enter image description here

1
  • 1
    My opinion is to go with the 'a' approach. Mixing server side languages with the angular 2 would be overkill for development. Especially if you'll go with the webpack files chunk. Go with the Angular 2 and REST API and you're good. Commented Feb 22, 2017 at 11:22

1 Answer 1

0

It all depends on your comfort level. You can go with first approach and care more about services and UI representation. You can take benefit of Typescript.

While in second case, if you are comfortable with razor view engine and then you can plug razor as your view engine for Angular. Also if you want to encapsulate your services then you can use controller and view model too. You can also take benefit of testability of MVC without hitting actual services that you can do in JavaScript also for angular.

Again all comes back to your comfort level and what sort of granularity you need.

Define your parameters to choose from scalable, maintainable, easy to learn, easy to deploy , easy to test.

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.