Node.js is a tool that in recent times has reached undeniable popularity, to the point of becoming an indispensable component in Web application development.
We do not intend to make a detailed analysis of its characteristics, but rather a simple description of its main features, the reasons for its success, and why, if you haven’t already, you should include it as a standard tool in your repertoire.
But, before going into depth, note that Node.js is Open Source, has an extensive community of users and contributors, and is available through its website https://nodejs.org/
What is Node.js?
Interestingly, it’s quite difficult to explain what Node.js is briefly. It’s not as simple as saying “a web server” or “a development environment” (and it’s neither of those, and a bit of both) or it’s a … “whatever”.
And that’s because, as often happens with really good tools, Node.js serves many purposes. Let’s look at the definition given on Wikipedia:
Node.js is a cross-platform, open-source, server-side runtime environment (but not limited to that) based on the ECMAScript programming language, asynchronous, with I/O data in an event-driven architecture and based on Google’s V8 engine
That didn’t improve things much, did it? Well, let’s try to fix it and see a summary of some of the characteristics of Node.js that have contributed to the success it currently enjoys.
JavaScript on the Server Side
It is well known that when communicating between two devices (computers, mobile, tablet, IoT) there is often a machine that acts as a server, and one or several clients.
The clients communicate with the server, and it returns information to them, which can range from a web page, data stored in a database, a message transmitted by another client… to anything.
Traditionally, there are languages that run on the server (PHP, ASP, JSP, Ruby…) and others that run on the client (on the Web, mainly JavaScript).
Precisely one of the first characteristics that stands out about Node.js is that it “flips” this situation, executing JavaScript on the server side.

It is not the only server-side technology that works with JavaScript (it wasn’t even the first) but it is undoubtedly a characteristic feature of Node.js.
One of the reasons for choosing JavaScript is that it is a widely used language and intimately related to Web development. For this reason, the learning curve is easy for a large number of developers.
On the other hand, the asynchronous and event-driven design characteristics of JavaScript made it suitable for Node.js’s main purpose, which we will see right next.
Focused on Scalability
Node.js was designed with scalability in mind, in particular, with the ability to support a large number of simultaneous connections to a server.
Many server-side technologies run the environment for each of the requests in an independent thread. When the number of requests increases, the resources consumed on the server increase.
In addition to the performance constraints of a computer (RAM, CPU, connection speed), on a server the bottleneck is often the input/output (I/O) processes.
As an alternative, Node.js uses a single thread and an asynchronous event loop. New requests are treated as events in this loop. This is the reason why the asynchronous features and events of JavaScript fit so well into the Node.js philosophy.
This allows Node.js to be able to manage multiple connections and requests very efficiently, making it suitable for development and applications with a large number of simultaneous connections.

Examples are the development of APIs, web applications with Ajax / Websockets requests, push messaging applications (RabbitMQ, ZeroMQ). Of course, it also holds a prominent place in the “Internet of Things” (IoT).
On the contrary, in general, Node.js is not suitable for applications that require a small number of connections with high resource consumption (calculation applications, intensive data access, etc.).
NPM Node Package Manager
Undoubtedly, another reason for NodeJS’s success is its package manager NPM (Node Package Manager). This allows us to access a huge amount of Open Source libraries developed by the community (and I emphasize, HUGE).

Among the thousands of packages that exist, notable ones include Express, React, Gulp, Socket.Io, Jade, Mongoose, Browserify, Forever, among many others. It’s a whole ecosystem you should know about!
The complete list of available packages is at https://npmjs.org/.
A Standard in Web Development
Is that all? Well, no! Although Node.js is neither a web server nor a development environment, the truth is that the enormous community and the huge library of available Open Source packages have made it become one of the standard tools in Web development.

Frequently, Web developers use Node.js, and the multiple available tools, to develop Web applications quickly. Running tasks, transpiling, minifying resources, synchronizing changes with the browser in real time… are just some of the options we have easily available in Node.js and that save an enormous amount of time.
Subsequently, this development can be deployed to the production environment, whether using Node.js itself, a Web server like Apache or Tomcat, or even embedding it in an IoT device.
Conclusion
Node.js is one of the trend-setting tools for years now. If you are really interested in applications that communicate over the Internet (including Web development and IoT) you should already have it installed.
Its characteristics make it interesting in itself but, combined with the enormous number of tools and the large existing community, makes it essential to understand how it works.
More information at

