locked
Angular2 in Core vs Conventional MVC RRS feed

  • Question

  • User1826113580 posted

    I have moderate proficiency with ASP MVC and also feel pretty comfortable now with Core. I'm going to start a new project pretty soon that will be heavy on the visual aspects and light on backend data services. Bootstrap will be used heavily.

    I'm trying to decide if I want to use Angular 2 with Core or just stick with regular MVC in Core. I tried an excellent template for Angular 2 in Core http://blog.stevensanderson.com/2016/10/04/angular2-template-for-visual-studio/ to jump start the learning process.

    However, it seems to me that using Angular 2 in Core gives up a huge amount of IntelliSense benefit as lots of Angular code doesn't seem to have this support. I rely on IntelliSense very heavily as coding is only one part of my software development. It's what I love about Visual Studio.

    So, my question is: even understanding some of the Angular benefits, and given that I have limited time to learn a whole new technology, is there some compelling reason to use Angular 2 in Core versus just staying with a conventional MVC development model?

    Friday, December 2, 2016 3:06 PM

Answers

  • User281315223 posted

    However, it seems to me that using Angular 2 in Core gives up a huge amount of IntelliSense benefit as lots of Angular code doesn't seem to have this support. I rely on IntelliSense very heavily as coding is only one part of my software development. It's what I love about Visual Studio.

    I'm not a huge Angular user, but have you tried any extensions that might be able to help with this? Either Angular Productivity Tools or the Angular 2 Snippets pack? There may be others, but Intellisense with Angular should work.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, December 2, 2016 6:28 PM
  • User281315223 posted

    Intellisense issues are often fickle ones and can generally be the result of some extensions that are conflicting. As the author of a popular extension, I can certainly attest to this. I'd recommend looking through your installed extensions and see if any pop out as those that might take over HTML intellisense.

    With regards to learning Angular, that's a toughie as well. Angular and React are really the two main choices with regards to a client-side framework (React obviously not so much of a full framework) and if you are going to learn one, Angular isn't a bad option.

    I'm a bit in the same boat personally. I've narrowed it down to two basic options :

    • Use ASP.NET Core for the back-end (i.e. Web API, etc.) and a client-side framework (Angular 2, Aurelia, Vue.js, etc.) to handle the front-end.
    • Use ASP.NET MVC along with React components in the Views (a hybrid approach).
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, December 6, 2016 7:42 PM

All replies

  • User281315223 posted

    However, it seems to me that using Angular 2 in Core gives up a huge amount of IntelliSense benefit as lots of Angular code doesn't seem to have this support. I rely on IntelliSense very heavily as coding is only one part of my software development. It's what I love about Visual Studio.

    I'm not a huge Angular user, but have you tried any extensions that might be able to help with this? Either Angular Productivity Tools or the Angular 2 Snippets pack? There may be others, but Intellisense with Angular should work.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, December 2, 2016 6:28 PM
  • User1826113580 posted

    Thanks for the suggestions but the Snippets pack won't install on the regular VS - looks like it's just for VS Code.  The Productivity tool installs but doesn't do anything - from the documentation it appears to also be for VS Code.

    Friday, December 2, 2016 7:53 PM
  • User1826113580 posted

    I should clarify that I was looking for some high level advice regarding a decision to learn Angular or just stick with MVC - hopefully from someone with who already made this decision and has experience with both approaches.  This is why I posted in the Architecture forum.

    However, IntelliSense is such a big part of my decision, perhaps I should give an example from an html page:

                    <li [routerLinkActive]="['link-active']">
                        <a [routerLink] ="['/counter']">Counter</a>
                    </li>
    

    IntelliSense works normally for li and a tags.  There is no IntelliSense for anything inside of the brackets [ ].  I'm not sure if this is normal or if I need to configure something to fix this.

    Friday, December 2, 2016 9:43 PM
  • User281315223 posted

    Intellisense issues are often fickle ones and can generally be the result of some extensions that are conflicting. As the author of a popular extension, I can certainly attest to this. I'd recommend looking through your installed extensions and see if any pop out as those that might take over HTML intellisense.

    With regards to learning Angular, that's a toughie as well. Angular and React are really the two main choices with regards to a client-side framework (React obviously not so much of a full framework) and if you are going to learn one, Angular isn't a bad option.

    I'm a bit in the same boat personally. I've narrowed it down to two basic options :

    • Use ASP.NET Core for the back-end (i.e. Web API, etc.) and a client-side framework (Angular 2, Aurelia, Vue.js, etc.) to handle the front-end.
    • Use ASP.NET MVC along with React components in the Views (a hybrid approach).
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, December 6, 2016 7:42 PM
  • User1826113580 posted

    Thanks Rion, I'll look through my extensions.  Like you, I'll definitely use ASP.NET Core for the back-end.  As for the client, I think I'll do more work on my project's design and then create a couple of rough prototypes to help make a decision.  This task would be a lot easier if BS4 and Angular2 with both ready for full integration into some standard VS templates.  As much as I appreciated the Steven Anderson template, it didn't do some things like incorporate authentication.  I find it's a lot more productive to start with a good template. 

    Wednesday, December 7, 2016 1:58 AM