Node.js is a popular framework whose syntax is based on the JavaScript (JS) programming language. The main purpose of this platform is to develop scalable distributed web projects and applications with high performance. With this component you can create chat rooms with multiple simultaneous connections and even online games. Before installing the "node", it is worth learning the syntax and basics of JS.
The installation kit includes REPL (JS launcher), package manager (npm) and a set of modules. However, most of the time you will have to use the standard command line - cmd.exe. Or you can use a web platform from Microsoft and their WebMatrix application or other stable IDE environment (like PhpStorm or IntelliJ IDEA). Some programmers also prefer to work with the "node" in Cygwin, as the framework was originally developed for Linux and MacOS, and later appeared a stable version for Windows.
The platform concept is based on the work of independent modules. This means that all classes, functions and variables declared through var cannot be used in one file in another, as they are not initially displayed in global space. However, data from different modules can be exported via module.exports or loaded via global objects.
The popularity of the framework is related to the event-oriented approach instead of the threading system. And if JS is most often used to create the client side of the site, then Node.js - to develop the server part with high memory consumption under high load.
- flexible development with JavaScript;
- asynchronous programming;
- support for a large number of simultaneous connections to the server;
- runs on the V8 engine, which is also used in Google Chrome;
- using an event-driven paradigm;
- any third-party programmer can write their own module;
- a large community on stackoverflow and other web resources.