Node.js is an Open Source Server Side Runtime environment built on Chrome's V8 JavaScript Engine. Node.js provides an Event Driven, Non-blocking Input Output and Cross-platform Runtime Environment for building highly scalable Server Side Applications using JavaScript.
Node.js is used to create different types of applications such as Web Application, Real Time Chat Application, Command Line Application, REST API Server etc.
Node.js REPL Terminal
REPL stands for Read Eval Print Loop and it represents a computer environment like a computer console or Unix/Linux shell where a command is entered and the system responds with output in an interactive mode.
Node.js Module
Module in Node.js is a simple or complex performance which is organized in one or more Javascript files which can be used in the whole Node.js application.
Each module in Node.js has its own context so it cannot interfere with other modules or pollute the global scope. Also each module are placed in a separate .js file inside a different folder.
Node.js implements the CommonJS modules standard. CommonJS is a group of volunteers that defines the Javascript Standards for Web Server Desktop and Console Applications.
Node.js Web Server
To access the web pages of any web application, you need a web server. Web Server handles all HTTPS requests for web applications For example IIS is a web server for ASP.NET web applications and Apache is a web server for PHP or Java web applications.
Node.js File System
Node.js File System Module as a file server allows you to work with the file system on your computer. To include the File System Module, uses the Require() Method. File system uses the following types of modules: Read Files, Create Files, Update Files, Delete files, Rename files.
Node.js Debugging
You can debug Node.js application using various tools. Such as Core Node.js Debugger, Node Inspector, Built-in Debugger IDEs etc. Node.js provides built-in non-graphic debugging tool which can be used on all platforms. It provides various commands to debug the Node.js application.
Node.js Frameworks
In the Node.js Web Server section, there is a very low level of code to be written to create a web application using Node.js. There are many Third Party Open Source Frameworks available in Node Package Manager which makes Node.js Application Development faster and easier. You can choose an Appropriate Framework according to your Application Requirements.
Node.js Data Access
Node.js supports all types of databases it does not matter whether it is a relational database or NoSQL database. Although NoSQL databases like MongoDb fit best with Node.js. To access databases from Node.js, you first need to install the drivers for the databases you want to use.
Node.js Global Objects
Node.js is available in all Modules in Global Objects Nature. We do not need to include these objects in our application, rather we can use them directly.
Node.js Callbacks
Callbacks is an Asynchronous Equivalent to a Function. It is called upon completion of each task. Callbacks Function is commonly used in Node.js. All of Node's APIs are written in a way to support Callbacks.
For example, when a function starts reading a file, it immediately gives control to the execution environment so that the next instructions can be executed. In Node.js, once the file I/O is complete, it calls the Callback Function.
Therefore there is no Blocking or Wait for File I/O. This makes Node.js highly scalable as it can process a high number of requests without waiting for any function to return the result.
Node.js Events
Events and Callbacks concepts are used to provide Concurrency in Node.js Applications. Node.js Applications are Single Threaded and each API of Node js is Asynchronous. So it uses Async Function to maintain Concurrency.
Uses Node Observer Pattern Node Thread maintains an Event Loop and after completing any task it fires the corresponding Events which signals the Event Listener Function to execute.
0 Comments