Developing Python and Node.js Applications using Visual Studio Community
Being pro-Microsoft, I have always talked about how Microsoft technologies, especially Visual Studio, extend their support for most, if not all, platforms out there. I got a chance at Microsoft Open Developer Conference (Lahore & Islamabad) to demonstrate how both Visual Studio Community and Visual Studio Code extend their support for Open Source software. Through this blog, I would like to talk about some of my favorite open source languages, namely:
- Visual Studio 2015 – Community Edition
- Support for Node.js
- Support for Python
Overview of VS Community and VS Code
Before we start looking at the support for Open Source stack on Visual Studio, first we need to know more about Visual Studio Community Edition and Visual Studio Code. Visual Studio community is a free, but fully-featured and extensible IDE for creating modern applications for Windows, Android, Web and Cloud. VS Community is free for individual developers, open source projects, academic research, education, and small project teams. So, if you are one of them you can grab your free copy of Visual Studio i.e. Visual Studio Community 2015. But, what’s Visual Studio Code? Now Build and debug modern web and cloud applications with VS Code. Visual Studio Code is free and available on your favorite platform i.e. Linux, Mac. OSX and Windows. So if you need a light weight IDE to debug your modern web and cloud applications Visual Studio Code is the tool of choice for you. This is first IDE by Microsoft for Linux and MAC; a release is expected for MAC OSX as well.
Support of Node.js in Visual Studio Community 2015
Microsoft has officially launched tooling for Node.js for Visual Studio Community. The best thing about it is it that allow you to have the same experience as that of developing and debugging native C# applications for Windows. You can now create Express Web Applications and Azure Cloud Applications using VS Community.
Lets Try Building a Express Web App
Few Clicks and you would be able to create a new project for Node based Express Web application. There is no need for commands anymore and installing npm dependencies as Visual Studio Community takes care of it all.
Easy npm packages installation
Now you can install npm packages with a single click. With the simple in-solution explorer, you can go to npm drop down, right click on it, click "Install new npm packages" and voila! You can also update your existing packages with a single click; which means now you need not go to command line repeatedly to install npm packages.
The debugging and developing experience using Visual Studio is absolutely wondrous! Visual Studio is known for its world class developing experience and debugging is but a part of development. What’s even more amazing is that you can also debug your node applications inside Visual Studio.
What that developers love the most while coding are code snippets and Node.js tools for Visual Studio offer a wide range of snippets for you to choose from. You can select and add your favorite node code snippet.
Support of Python in Visual Studio Community 2015
Python (Language) is growing steadily, at a very fast pace. People are adapting python for different purposes. Visual Studio being a rich IDE now provides support for Python as well. You can create different kinds of projects inside Visual Studio for Python; for example:
- Simple Python Application
- Azure Cloud Service
- Bottle Web Project
- Flask Web Project
- Django Web Project
- IronPython Application
- IronPython WPF Application
- IronPython Silverlight Web Page; and more.
Creating Simple Python Application in Visual Studio 2015
Let’s start with simple Python Application in Visual Studio. It's really easy to create a new project for Python using Project Creation Wizard. The .gif image below will guide you on the basic steps to create a Python project.
Intellisense for Python In Visual Studio
Visual Studio with tools for Python provides amazing Intellisense with the liberty to use use code snippets. It is really easy to add a python package using easy install or Pip inside Visual Studio, as shown in the .gif below.
Virtual Environment, Versions of Python, packages and Interactive Shell
You can manage different virtual environment and versions of Python inside Visual Studio. You can manage your downloaded packages and use interactive shell inside Visual Studio for Python as playground to test things.
With Visual Studio, we can now create amazing Python and Node applications. You can further study about Python and Node.Js tools for Visual Studio on the links below.
Disclaimer: The views expressed here are solely those of the author in his private capacity and do not in any way represent the views of Systems Limited, or any other entity related to Systems Limited.