Node.js support in Visual Studio

Node.js support in Visual Studio

Node.js support in Visual Studio

Visual Studio has always been the most mature IDE in the Windows ecosystem. It’s productivity and stability is un-paralleled (except VS2008, yikes!). In the last year, Microsoft has changed it’s focus from an operating-system sales-engine to a platform and services company.

One side-effect of this amazing business decision is the change for Visual Studio developers. Microsoft has always tried give the best tools for software developer targeting their ecosystem. Now, they are trying to provide tools and services for developers, no matter what platform or ecosystem is targeted.

On Nov 19th, 2015 version 1.1 of Node.js Tools for Visual Studio was released. I’m going to show how modern software development is accomplished using Node in Visual Studio. Please remember, this is from the perspective of a new Node developer who has spent most of their development career in Visual Studio writing C#.

You might have noticed the emphasis on modern above. For me, that includes the following:

  1. Unit testing
  2. Package management
  3. Version control
  4. Task runners

I put unit testing first on that list for a good reason. Unit testing is one of the most important features of any language or IDE. I learn how to write unit tests when I learn a new language or IDE. The language is too immature if it’s not easy to write and run unit test. Node unit testing, like much of VS now, is just a plug-in install away.

Package management allows developer to define which 3rd party libraries are required to build and run the software. Microsoft has put a lot of effort in supporting NuGet in earlier releases. The Node Package Management (npm) support is excellent. Packages will be pulled on build automatically.

Version control is an extremely important feature of any IDE. Previously, VC has been a problem for Microsoft. However, they recognize the gravity-well of Git and GitHub sucking all the developers in. They now have first class support for Git. However, I still use a more full-featured Git plug-in.

Task runners have always been considered outside of the IDE. They’re viewed as a command-line tool. Still today, I meet many developers who are not comfortable at the command-line. (I grew up in Unix so I don’t have this aversion!) VS task runner support is excellent and, again, requires a small plug-in install

My next post will cover the steps to setup Visual Studio for Node development. Stay tuned!

This post was written using Visual Studio Code which has excellent Markdown support.