Skip to main content

What is Node.js?

Node.js is a server-side, event-based JavaScript runtime environment designed by developer Ryan Dahl as an application for the development of scalable network applications. Since its introduction in 2009, Node.js has become increasingly popular and is now one of the most sought-after application frameworks in programming.

As an application, Node.js and its functions are based on the V8 engine from Google Chrome. This means that the same engine that is used in Google Chrome to execute the JavaScript code is also used in Node.js.

Even if the framework of the application is mainly used as a runtime environment for web server programming, it is now also used in other areas, such as the creation of scripts or tools for the command line or for the development of desktop or real-time applications.

Application advantages of Node.js

Probably the most significant difference between Node.js and conventional web serving techniques and functions is that the communication is asynchronous, so-called non-blocking I/O. According to developer Ryan Dahl, this was used incorrectly until the introduction of Node.js, as until then the thread model was in use and therefore the entire application process was blocked due to synchronous communication. With Node.js, the server no longer has to start a separate thread for each request. Instead, there is a single thread as a function that processes all requests one after the other in an endless event loop and therefore uses much less memory than conventional models. An ingenious functional principle!

Furthermore, no additional server is required for a Node.js application, as the application is also the web server. The fact that the server and client use the same programming language (JavaScript) is certainly another advantage for many users, as the entry hurdle is correspondingly low, especially for web developers, and almost every function is self-explanatory.

As an application, Node.js also comes with a range of built-in modules and functions that are available without further installation. For example, there is the url module, which provides functions for analyzing and formatting URLs, or the fs module, which enables access to the local file system in the application. It is also possible to create your own modules. Node has a so-called Node Package Manager (npm) for installing modules/functions and managing dependencies. When the Node.js application is installed, npm is also installed at the same time and is therefore immediately available to the user.

Widely used application NODe.JS

According to the latest survey by Stack Overflow, in which around 90,000 developers took part, an astonishing 50.4% of professional developers stated that they use the Node.js application as a framework. Netflix, Paypal, Uber and LinkedIn are among the well-known large companies that have also opted for Node as their application. Above all, the strengths of the runtime environment, such as short loading times, the use of the same programming language for server and client and the scalability of the application played a major role in the decision.

How can you learn Node.js?

As JavaScript is one of the best-known and most popular languages in web development and is generally used in all common web browsers, getting started with the application is particularly easy, especially for web developers. If you are familiar with the scripting language but would like to do a tutorial to get to know the most important methods and modules of Node.js, you should take a look at the Node.js tutorial from w3schools.

Further information:

https://nodejs.org/en/about/

Video:

Book tips