NodeJS, Azure

NodeJS: The Little Platform That Could

Web technologies are evolving at an exciting pace these days. HTML5 and CSS3 provide the tools to make the web fluid and engaging, allowing developers to create rich web apps with ease. However, despite the advancements on client-side development, server-side development has evolved at a much slower pace. A developer can create their web app, but velocity slows when server interaction requires tedious refactoring to work with new client technologies.

To bridge that gap between client and server development, a lightweight platform called Node.js was created in 2009. Believe it or not, Node.js is written in javascript and runs on V8, the javascript engine for Google’s Chrome web browser. Although it may seem ridiculous to use a javascript-based server platform, Node.js was designed for event-driven development. Thanks to the power of V8 and the flexibility of javascript’s event framework, Node.js is a lightweight, non-blocking platform ideal for creating network applications.

Why Node.js?

Just as javascript is flexible and built for the web, Node.js provides developers with the same freedom on the server-side that they enjoy on the client-side. By programming in javascript on the server-side, there is no need to convert or alter data for the web standards. In the same regard, there is also no need to change coding styles when switching from client to server development, which results in faster development cycles.

Node.js also provides a plugin framework: the Node Packaged Modules (NPM). NPM provides developers with a quick and easy method for downloading and installing modules for their applications. From MVC frameworks to multi-processor clusters, thousands of modules exist to solve any problem you may face.

Finally, Node.js provides the powerful benefits that come with simple scalability. Thanks to the event-driven nature of Javascript, the lightweight overhead of V8 and the existence of powerful modules, Node.js can very quickly be distributed among processes or servers. Whether creating a load-balancing cluster or separating your apps between servers, Node.js allows a system to be distributed with minimal effort by the developers.

Node.js is a powerful platform for network applications, from web servers to web services. While it is still a young platform in web development, many corporations such as eBay, LinkedIn, and Wal-Mart have already used it in production systems. In fact, Windows Azure cloud platform began supporting Node.js in  June 2012, making it easier than ever to take advantage of Node.js.

Why Node.js on Azure?

Windows Azure supports a number of ways to get started with Node.js on the cloud. The quickest and easiest is to use Node.js to create an Azure website. In less than two minutes, I was able to create a new website on Azure and publish the default site for Express, the premier MVC framework for Node.js. Azure works seamlessly with Visual Studio and WebMatrix 2, allowing you to easily develop and publish your Azure projects. Each development tool provides site templates, Node.js intellisense, and access to NPM. Projects can be published using TFS or Git, allowing for full source control and collaboration.

Another approach to using Node.js on Azure is as a Cloud Service, which functions similar to an Azure website but provides greater flexibility and increased scalability. Cloud services are easily set up via the Azure PowerShell that installs with the Azure SDK. From a personal CDN to a RESTful API server, Cloud Services allow you to enhance your web and enterprise applications.

Windows Azure support of Node.js makes it possible for developers to create powerful back-end servers for web and mobile applications. The scalability of Azure and Node.js make for a perfect duo, allowing developers to easily scale applications without any changes to the code. That ease of scalability combined with the broad tools and resources provided by Microsoft makes Node.js an extremely attractive approach to building any network application.

Author image

About Jim Buck

Jim is a leading Software Engineer/PM in the Baltimore Area, specializing in ASP.NET Core, NodeJS, and Azure. Passionate about open source, he enjoys building tools and speaking about tech.
  • Baltimore, MD