Node.JS Introduction

Node.js is a purely open-source JavaScript runtime environment and it built on Google Chrome’s V8 JavaScript Engine. In 2009, Ryan Dahl has implemented a Node.js and it uses an event driven, non-blocking (asynchronous) I/O model so by using Node.js we can create a highly scalable and cross-platform server side applications.

 

Generally, we can execute JavaScript code or file only in client-side but by using Node.js we can execute JavaScript code or file in server side to generate dynamic web content based on our requirements.

 

Node.js is same like PHP, Java or Asp.Net but only difference is Node.js will operates on single thread event loop using asynchronous I/O calls. By using Node.js, we can build a different type of applications such as command line applications, web applications, chat applications, REST API services, etc. based on our requirements.

 

Node.js is a lightweight framework that includes a minimum modules while creating an application and we can include other modules based on our application requirements. There are thousands of open-source libraries are available for Node.js and most of them are hosted on npm website. Now a day’s, Node.js is officially supported by all major operating systems like Windows, Linux, Mac, etc.

Why Node.js?

  • Node.js is completely free and open source server-side JavaScript framework.
  • Node.js will run on JavaScript so we can use the same language for both server and client side.
  • By default, Node.js is an asynchronous event driven JavaScript runtime so it will provide a better performance when compared with other frameworks.
  • Node.Js will operates on single thread event loop using non-blocking (asynchronous) I/O calls to support thousands of concurrent connections.
  • By using Node.js, we can build command line applications, web applications, REST services, etc. based on our requirements.
  • Node.js is a cross platform framework and it will run on all major operating systems (Windows, Linux, Mac OS, etc.). 

Where we can use Node.js?

  • Node.js is useful in single page and streaming applications.
  • We can use Node.js to build a real-time applications like chat rooms, online games, weather apps, etc. based on our requirements.
  • We can create a server side applications just like PHP, Asp.Net, Java, etc.
  • Node.js is suitable for prototyping and agile development.
  • We can use Node.js as full fledge server.

Topics Covered