What Does Node.js Mean?
Node.js is a server-side platform wrapped around the JavaScript language for building scalable, event-driven applications. This is confusing for even experienced programmers because the traditional JavaScript environment has always been client-side – in a user’s browser or in an application that is talking to a server. JavaScript has not been considered when it comes to the server responding to client requests, but that is exactly what Node.js provides.
Node.js is not written in JavaScript (it is written in C++) but it uses the JavaScript language as an interpretive language for server-side request/response processing. In other words, Node.js runs stand-alone JavaScript programs. The advantage is that programmers can use their current, albeit client-side, programming knowledge and begin coding with Node.js much more easily.
Techopedia Explains Node.js
Node.js has several attributes that make it particularly attractive for network or over-the-Internet programming. The first has to do with all the overhead and packaging that existing technologies use to talk back and forth over the Internet.
Imagine you are shipping a small package by FedEx and you note all the “containers” your package travels in on its way to the destination. There would be a truck that carries all the packages to a local processing center. There would be large bins at this center that are forklifted over to the airplane shipping containers that are used to transport to the destination center. And once the package arrives, the reverse takes place with other packages going in the opposite direction.
All this packaging and repackaging is a laborious and expensive process and is exactly what the current programming technologies like JSON and REST do to move data over the Internet. Node.js cuts this repackaging down considerably and provides a lightweight means of accomplishing the same task.
The second Node.js attribute that is attractive has to do with the Web programming event model. Most existing technologies are written to take “big gulps” of data for every request and response. In other words, a whole page of data might be sent to a server – even if there are only smallish changes. These technologies are optimized to use larger chunks of data with fewer events. Node.js does the opposite; it is designed to work with more interactivity – smaller chunks of data responding to many more events.