What is Node.js?
Node.js is a runtime environment and a library for running applications written in JavaScript outside the browser.
Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications.
Node.js is an event based, asynchronous I/O framework that uses Google's V8 JavaScript Engine.
Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
It is used for developing applications that make heavy use of the ability to run JavaScript both on the client, as well as on server side and therefore benefit from the re-usability of code and the lack of context switching.
Some of the Applications that can be written using Node.js.
- Static file servers
- Web Application frameworks
- Messaging middle ware
- Servers for HTML5 multi player games
Normally it is an event-driven I/O framework for the V8 JavaScript engine.
Event-driven I/O server-side JavaScript environment based on V8
What is V8?
V8 is Google's open source JavaScript engine.
V8 is written in C++ and is used in Google Chrome, the open source browser from Google.
The basic philosophy of node.js is:
Non-blocking I/O - every I/O call must take a callback, whether it is to retrieve information from disk, network or another process.
Built-in support for the most important protocols (HTTP, DNS, TLS)
Low-level.
Do not remove functionality present at the POSIX layer. For example, support half-closed TCP connections.
Stream everything; never force the buffering of data.
Note:
Node.js is different from client-side Javascript in that it removes certain things, like DOM manipulation, and adds support for evented I/O, processes, streams, HTTP, SSL, DNS, string and buffer processing and C/C++ addons.
Video Tutorial for what is node.js?
https://www.youtube.com/watch?v=RH_BTidPkps