Why is Node.js so popular

Posted by Cyril Walle

Cross Platform

Node.js just works on Windows and Linux.

It's JavaScript

Which means every experienced JavaScript developer can start with Node.js without too much difficulty. And JavaScript is the main programming language of the Web.

JavaScript is

  • Multi paradigm
  • Access to low level features
  • Access to high level APIs via NPM (see below)
  • Fast startup time, invisible compilation

Distribuable

Package a Node.js app into a .exe app with a simple command.

More than a JavaScript engine

It provides function, to write and read files, make http request etc.

Fast IO

One of the strength, is fast input-output. Streams of data is a built-in type in Node.js land. This makes it good for web servers that need to use WebSocket or HTTP.

Asynchronous by default

Most function in Node.js are asynchronous by default. Which means reading from a file or a http request does not block the rest of the program.

People started writing cli apps with it

And it is amazingnode mycli.js. Oh it already ran in 0.1s.

  • surge to deploy any local HTML, CSS, JS file to a website
  • blog-engine-sac to create a website from markdown files
  • SVGO to optimize svg files
  • and thousands more

NPM - A node package manager

Publish any JavaScript file to the public registry with ease. Then reuse that file in every project with a simple npm install command.

And install small and large libraries to draw images, send emails etc.

And install cli apps written by others in a few seconds. Eslint for example is used by a lot of companies, just check the sponsors.

And install any function you may need. Need to check if a string is an email ? There's a package for that. Need to parse markdown ? There's a package for that. Need a random image of a cat ? Yep There's a package for that.

Npm is so good for productivity, since all these packages can be used as building blocks for rapid software development.

Electron

Electron is a project anyone can use to develop desktop apps with HTML, CSS, and JS. It combines Chromium, to display the HTML, CSS and Node.js to get file access amongst others. And cross platform of course.

People who use Node.js

In conclusion we have

  • Node.js back-end developers
  • Cli apps developers
  • Front-end developers to get access to the cli apps and to NPM
  • Front-end developers who write desktop apps with Electron