What is Node.js?

Posted on 20th January 2017

JavaScript was originally developed as a dynamic, untyped webpage scripting language that can be interpreted by browsers. But soon its use spread to non-web based environments like PDF documents, desktop applications, video game development, server-side applications, network programming etc. For JavaScript to be executed outside a browser, it needs an interpreter. Node.js provides a runtime environment that interprets JavaScript using Google's V8 JavaScript engine, the same environment used by Google Chrome.

Node.js is a runtime environment for creating server-side and networking applications. It can be installed on a variety of operating systems. It provides two things - a runtime environment as well as a useful JavaScript library for creating networking and server-side applications. It provides built-in modules for core functions like filesystem I/O, networking, buffers, data streams, and cryptography. Developers have built a wealth of useful open-source modules for Node.js. These can be installed with Node's package manager called npm (Node Package Manager).

Several server frameworks have been built for Node.js for rapid application development. The most popular ones are Express.js, Connect, Socket.IO, Koa.js, Hapi.js, Sails.js, Meteor and Derby. There are also many IDE's that support Node.js - NetBeans, Microsoft Visual Studio, TypeScript, Nodeclipse , Visual Studio Code, Atom, Brackets, JetBrains WebStorm etc.

The main difference between Node.js and other server side scripting languages like PHP is that it is non-blocking. Commands can be executed in parallel.Asynchronous functions can take call back functions as argument to signal successful completion or error. The event-driven architecture and asynchronous I/O capability makes Node.js an excellent candidate for real time communication applications like chat and gaming.

Post a comment


Nothing the first to share wisdom.