What is Node.js?
What is Node.js?
NodeJS is a Server side platform built on Javascript Engine (V8 Engine). Node.js was developed by Ryan Dahl in 2009 and the final version is v0.10.36. Defining NodeJs by official documents is as follows:
Node.js is a platform based on the Chrome Javascript runtime to build fast, great applications. Node.js uses event-driven components, non-blocking I / O models to create lightweight and efficient applications for real-time data applications running on devices. scattered.
NodeJs is an open source, multi-platform for developing Server-side applications and network-related applications. Node.js application is written in Javascript and can run in Node.js environment on Windows operating system, Linux .
Node.js also provides us with a variety of Javascript modules that can simplify the development of web applications using Node.js with extensions.
Node.js = Runtime Environment + Javascript libraries
Features of Node.js
Here are some important features that make Node.js the leading choice in software development:
Event Driven : All the APIs of Node.js library are asynchronous, meaning no blocking. It is essential because Node.js never waits for an API to return data. The server switches to an API after calling it and has the Node.js Event notification mechanism that helps Server receive feedback from previous API calls.
Runs very fast : Based on the V8 Javascript Engine of Google Chrome, the Node.js library is very fast in the code execution process.
Simple but high-performance processes : Node.js uses a single thread model with repetitive events. Event mechanisms help Server return responses in a non-blocking manner and create highly efficient Servers in contrast to traditional ways of creating a limited number of threads to manage requests. Nodejs use single-threaded programs and these programs provide services for more requests than traditional servers like Apache HTTP Server.
No padding : Node.js application does not store buffer data.
License : Node.js is released based on MIT License.
With Node.js, you have to do everything
Node.js is just an environment - this means you have to do everything yourself. There won't be any default servers !!! A script handles all connections to the Client. This greatly reduces the amount of resources used in the application.
Who uses Node.js
Below is the link on the github wiki containing a list of projects, applications and companies using Node.js. Included in this list are eBay, GE, GoDaddy, Microsoft, Paypal, Uber .
Important components in Node.js
The following diagram describes the important components of Node.js that we will discuss in the next chapters.
Where is NodeJs used?
Here are the areas where Node.js is used as a perfect choice:
- I / O applications
- Data flow applications
- Real-time data applications
- Applications rely on JSON APIs
- Single Page Application applications
Where Nodejs should not be used: It should not be used in CPU-intensive applications.
According to Tutorialspoint
Previous lesson: Insert algorithm (Insertion Sort)
Next lesson: How to install Node.js
You should read it
- How to compress and decompress files in Node.js
- How to Install Node.Js on Windows
- How to install NVM on Debian
- Schema validation in Node.js using Joi
- Instructions for installing Node.js
- Event Loop in Node.js
- Concept of Buffer in Node.js
- Read the File record in Node.js
- Utility Module in Node.js
- REPL Terminal in Node.js
- NPM in Node.js
- 10 things not to do when running Node.js application