Node JS training Online

Know More About Node. JS

Node.JS is a cross-platform JavaScript runtime environment which executes JavaScript code server side. In other words, Node. JS is a platform built on the JavaScript runtime of Google Chrome to build scalable and fast applications. It uses an event-driven, Non-blocking I/O. It is lightweight and efficient and perfect for data-intensive real-time applications that run across distributed devices.

Node. JS can handle a good number of concurrent connections with high throughput which equates to high scalability. This makes it more suitable to build scalable and fast applications. In the traditional techniques of web servicing, each request or connection generates a new thread but Node.JS works on a single thread. It uses non-blocking I/O calls which allows it to support thousands of simultaneous connections or requests.

Another important fact is that a built-in support for package management using NPM tools is coming along with each Node.JS installation. Here is the list of some of the most used NPM modules.

  • Express: – A web development framework
  • Hapi: – Modular and simple to use the configuration-centric framework
  • Connect: – HTTP server framework
  • Socket. Io and Sock. JS: – Server-side components
  • Pug: – The templating engine
  • MongoDB and Mongols: – Wrappers to provide the API for MongoDB object databases.
  • Redis: – Client library
  • Lodash: – The JavaScript utility belt
  • Forever: – Utility for ensuring that a given node script runs continuously
  • Moment: – lightweight JavaScript date library for parsing, validating, manipulating, and formatting dates.

Where Node.JS can be used

Along with Express.JS, Node. JS can be used to create web applications on the server side. However, there are pros and cons for using Node.JS here

Pros

In case the application does not have CPU intensive computation, the same can be built in JavaScript using JSON storage Object DB. This will make the development easier.

Crawlers will get a fully rendered HTML response and hence the search engine optimization will be enhanced.

Cons

Node.JS responsiveness may get blocked by any CPU intensive computation. Hence a threaded platform will be the better option.

When Node.JS is used, working with a relational database is painful.

Where Node.JS should not be used

This should not be used for building server-side web application when a relational database is behind it because relational database tools for Node.JS are still in the early stages of development.

It is not advisable where there is a heavy server-side computation.

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *