Please enable Javascript to correctly display the contents on Dot Net Tricks!
 
Become an Expert in C#, .NET, MVC, JAVA, PHP, AngularJS, Hadoop, Android, iphone, Testing etc.
by Joining our Training Programs and Take Your Career to the Next Level! To know more make a call on +91-987-174-9695

What is Node.js and Why to use it?

Posted By : Shailendra Chauhan, 05 Aug 2015
Updated On : 07 Aug 2015
Total Views : 2,306   
 
Keywords : advantages of nodejs, nodejs advantages, nodejs with .net, why to use nodejs, nodejs limitations

Node.js is a platform based on Google's V8 JavaScript Engine. Node.js is used to build fast, scalable network applications. It uses an event-driven, non-blocking I/O model that makes it lightweight, efficient and perfect for data-intensive real-time applications.

V8 JavaScript Engine

V8 is written in C++ language and implements ECMA Script (ES5). V8 is used in Google Chrome and can be run standalone or can be embedded into any C++ application.

V8 uses just-in-time compilation (JIT) to execute javascript code. V8 can run on Windows XP, Vista, Windows7+, Mac OS X 10.5+, and Linux OS. The first version of the V8 engine was released with the first version of Chrome on September 2, 2008.

According to Wikipedia, V8 compiles JavaScript to native machine code (IA-32, x86-64, ARM, or MIPS ISAs) before executing it, instead of more traditional techniques such as interpreting byte code or compiling the whole program to machine code and executing it from a file system.

Why Node.js?

As you know, JavaScript is an event-based language, so if you are using javascript at server side then anything happens on the server will trigger a non-blocking event. For example, each new connection request will fire an event, received data from a form will fire a data-received event, requested data from the database will fire data-requested event.

It means a Node.js site will never lock up and can support thousands of concurrent users. In this way Node.js plays the role of web server like Apache and IIS. Actually, Node.js allows you to process new requests without waiting for back-end services to respond.

Node.js is also great for mobile applications, which typically rely on an API server to service requests from thousands of devices at once.

Node.js Application Area

Node.js can be used to create the application for the following purposes.

  1. E-Commerce

  2. Social Media

  3. E-Commerce

  4. Realtime Services

  5. Data Streaming

Who use Node.js

  1. Walmart

  2. E-bay / PayPal

  3. Microsoft

  4. LinkedIn

  5. Yahoo

  6. Google

Note

  1. Node.js is not a javascript library, but it is a platform to execute javascript on server side.

  2. Node app can not be deploy on your existing hosts like shared web hosting etc.

  3. You can use VPS and dedicated servers to install node and run your app.

  4. The easiest way to deploy your node app is to use a scalable service like Heroku, which is completely free and you only need to pay when you are using more resources.

What do you think?

I hope, now you have better understanding about Node.js. I would like to have feedback from my blog readers. Your valuable feedback, question, or comments about this article are always welcome.

 
Further Reading
 
About the Author
Hey! I'm Shailendra Chauhan full-time author, consultant & trainer. I have more than 6 years of hand over Microsoft .NET technologies and other web technologies like JavaScript, AngularJS, NodeJS etc. I am an entrepreneur, the founder & chief editor of www.dotnet-tricks.com and www.dotnettricks.com. I am author of most popular e-books for technical Interview on ASP.NET MVC Interview Questions and Answers & AngularJS Interview Questions and Answers & LINQ Interview Questions and Answers.
I have delivered 100+ training sessions to professional world-wide over Microsoft .NET technologies such C#, ASP.NET MVC, WCF, Entity Framework and other mobile technologies such Ionic, PhoneGap, Corodva. Read more...
 
Free Interview Books
 
SUBSCRIBE & FOLLOW US
 
Browse By Category
 
 
Like us on Facebook