Node.js has become one of the most predominant JavaScript based solution frameworks over the last couple of years.  As with most ideas that start in the open source community it has crept its way into the Microsoft based platforms.  For those of us who make our living in the Windows ecosystem it is beneficial to know what tools are available to add Node.js components to our solution landscape.

This post will briefly introduce four of the development environments to build Node.js projects on the Windows platform.  These include DOS command line, VS Code, WebMatrix and Node.js tools for Visual Studio.

Command Line

image

As with most development, the solution with the fewest bells and whistles has the most power.  You can simply download the Node.js base from nodejs.org.  This will supply you with all the basic components including a Node.js command window.  At that point you can use npm to pull down what ever packages you wish to leverage and use your favorite text editor to develop solutions.

VS Code

One step up from command line is Visual Studio Code.  This is a tool that Microsoft built in response to the portion of the development community who prefer a minimalist solution where you pick every feature you want to include in your code explicitly.  Since it is a very file based/folder based tool there is no native support for managing associated resources such as modules that you want to include in your Node.js package.  In many cases you still need to leverage the command line in order to perform operations such as adding modules.

image

You can open an existing Node.js folder and effectively maintain your application.  There are several VS Code Extensions available to help with the out of the box deficiencies and more are being added all the time.

WebMatrix

With WebMatrix you add the ability to start from a project template. You still won’t have the capability out of the box to add new Node packages.  In theory this should be overcome by simply installing the NPM Gallery extension, but when I tried it there were bugs that prevented retrieving any new packages.

image

On another cautionary note, I have found that WebMatrix can have unpredictable problems where sometimes Node.js code that will work in other tools will have random results.  I’m not sure if this is a result of my environment or the WebMatrix hosting model, but buyer beware.

Node.js Tools for Visual Studio

Visual Studio is the envy of all other development platforms so it is to be expected that it is the best development experience for the Windows platform.  You have all your favorite productivity features.  If you are normally a .NET developer and need to do Node.js development this is your choice, hands down.  It gives you intellisense, debugging and profiling on top of NPM integration.  What more could you ask for?

image

Summary

In the end everyone will have their favorite toolset based on how they work and what type of projects they are developing.  There isn’t a right or wrong choice, just your personal preferences.