Gicbol

Programming Tutorials & Howto Guides

Understanding Node.js : What is Node.js & Why Should You Use It


You might be wondering “what is Node.js” or “why should you use Node.js”? Well, understanding Node.js may help you to adapt this awesome environment for your next web application.

Today in this article we will discuss what exactly Node.js is and why should we use it.

Here’s the deal: first of all we will simply learn about the Node.js. runtime environment. Furthermore, we will see some of its interesting features. Finally we will try to understand why should we use Node.js.

understanding node

Understanding Node.js

Look, Node.js is a free, open source and cross-platform Javascript runtime environment built on Google Chrome’s V8 engine for executing Javascript on server side. Node.js has a event driven architecture with non blocking I/O API that makes it lightweight and efficient.

Cross-platform, runtime environment, V8, event driven, non blocking I/O – too many technical words, right? No issue, let’s understand them one by one.

Features of Node.js

Cross Platform

Firstly, what is cross platform? Well, in computing, cross platform refers to the implementation in multiple computing platforms. So when it says Node.js is cross platform, it means Node.js runs on various platforms such as Linux, Windows, Mac, etc.

Runtime Environment

A runtime environment is  basically a collection of software and hardware resources that enable a software program to be executed on a computer. Node.js runtime includes different libraries. As a result, it brings modularity to the Node.js. Each and every functionality is divided and implemented as a separate module or package.

V8 Engine

The Chromium Project developed V8 engine for the Google Chrome. It is a Javascript execution engine that compiles Javascript code to native machine code instead of interpreting it in real time. In 2008, Google made it open source.

Event Driven

In HTML, event is a thing that happens to the HTML element. Javascript can react on those events. Hence, event driven architecture is a software architecture promoting detection and reaction to the events. Node JS Platform follows event driven architecture to interact or handle requests.

Non Blocking I/O

A simple approach to input and output (I/O) operations would be to start the access and then wait for it to complete. As a result, such an approach would block the progress of a program while the I/O operation is in progress. Non blocking I/O eliminates the waiting, and simply continues with the other processing.

Understanding Node.js Usage?

So far we have discussed about Node.js and some of its technical features. Now, you might be thinking what’s the bottom line – why to use Node.js?

Javascript Everywhere

We need to use only one language to develop whole applications, i.e. Javascript. From front end to back end, you will code in Javascript only. Furthermore, it also uses only one data format for both front and back ends – JSON (Javascript Object Notation).

Free and Open Source

Node.js is a open source development environment. As a result, it is free to use.

Scalability

To improve performance of the application, Node,js uses horizontal scaling i.e adds more nodes to the system which is consistent with today’s Cloud Technology trend.

Better Performance

Node.js follows Non-Blocking I/O architecture to eliminates the waiting for I/O operations, resulting in better performance than PHP or ASP.

Package Management

Node.js has thousands of modules developed by both Node.js community and third-party clients. The npm is the pre-installed package manager for the Node.js. It is used for installation and management of Node.js packages.

Final Words

In conclusion, Node.js brings the benefits of JavaScript to back-end programming. Understanding Node.js will definitely help you to develop various real time web applications – chatting applications, messaging applications, game servers, advertisement servers, logistics systems, streaming servers, proxy servers, network applications, bots and many more.

Save

Save

Save

Save

Save

Save

Save

Pin It on Pinterest