Node JS- Getting Started

Node.js is a highly popular, scalable, open-source server. It uses Google Chrome V8 JavaScript engine at its core. It was developed by Ryan Dahl based on the concept of non-blocking IO in 2009.

In a layman’s view, the NodeJS is the Chrome’s V8 engine converted into a backend server. In this process, we have removed the DOM related libraries for the browser display. As part of the back-end needs, we have added many crucial libraries for the IO operations with filesystem, database and the network systems etc. These libraries enables us to keep these major time consuming IO operations asynchronous and non-blocking.

 

 

As a result of these IO libraries, we are able to keep the major overhead of a back end server away from the single processing thread. And, in turn, it allows the processing thread to be free and run the programs as fast as we observer in the browsers.

The removal of the delays due to IO operations makes NodeJS highly scalable for the data intensive applications compared to its multi-threaded server counterpart. The article on ‘Single Vs Multi-Thread Model‘ explains this difference using a simulation.

Apart from being scalable, the other key advantage is its ease of learning. With the same language in use for both the front-end and the back-end, it becomes easy to shuffle and manage the teams. A good end to end knowledge, greatly improves the interest and the contribution from the team members as well. No wonder why, we have such a large community base and a huge set of libraries in the NPM registry!

Before we move on to the next topic, here is the summary of the key benefits including what we have discussed so far.

Key Benefits of NodeJS

  1. Highly Scalable: The non-blocking IO implementation makes the NodeJS server highly scalable for the data intensive applications. It enables us to handle significantly high amount of traffic with minimal front-end servers. 

    This is the one of the core reason behind its fast paced growth and wide level of acceptance. Most of the leading enterprises including the likes of LinkedIn, Uber, Twitter, Microsoft, Netflix use NodeJS for many of their high volume applications.
  2. Easy Learning Curve : The usage of the same language for both client and server side code makes the learning easy in NodeJS.
  3. Lesser Compatibility Issue : The server-side compilation allows us to use the latest ECMA scripts syntax, worrying much less about clients browser versions. The ECMA transpilers can take care of many of the compatibility issues. The frameworks like Angular, React and Vue are some the example providing easy to use frontend frameworks using ECMA scripts. 
  4. Huge Open-source Libraries : It’s a highly popular framework enjoying a huge community base. And, it has million plus open-source libraries available in it’s npm registry.  

NodeJS IDEs

It is well supported by a good set of tools and IDEs. Some of the prominent IDEs for NodeJS development are :

Desktop IDECloud Based
Atom by GitHubEclipse Cloud IDEs by Eclipse
Visual Studio Code by MicroSoftAWS Cloud9 by AWS
IntelliJ IDEA or WebStorm by JetBrains
Komodo IDE by ActiveState
Sublime Text by Sublime HQ
Brackets by Adobe