Node Js tutorial for beginners

What is Node js

Node.js is basically a Javascript based language that inherit all the properties of javascript including all advance OOPs concept. Its an open source, cross platform and run time environment for development of next generation web applications. In todays era when moreover hybrid applications are being created then the use of node is treated like an invention for these applications. In other words, Today almost all major applications are not a single large standalone application instead of it’s a combination of more than one application where each single application is developed for its own purpose. And in order to provide a great experience for application user they all are binded together tightly such that even after having completely separate application they are behaving like all the data is coming from one application only. Node.js is a revolution for creating hybrid applications . It allows creating web servers and networking tools using javascript. In short, Node reduce the complexity of creating/writing sever side application with the help of their some great modules like file system, networking things (i.e., HTTP, TCP, UDP, crypto graphics, data streams etc.)

Developer of Node js:

Ryah Dahl is the man behind the invention of Node.js in 2009. The idea came to his mind after seeing a file uploader process at flicker. On flickr image uploading he has found that there is a lengthy process being followed to get response from server about how much percent (%) of image uploading has been done so far. Because by default we only know the status of file uploading its hard to create a progress bar for file uploader. Its built on V8 javascript runtime and written in C++.

Why Node js:

Node.js is an open source, cross platform and run time environment for development server side applications. Its also supported by Googles fast virtual machine V8. There are some points that gives strong reason for such huge popularity of this programming language.

  1. Javascript: Since its based on Javascript and Javascript is already available everywhere so there is no any issue of further cross browser or anything else.
  2. Open Source: Its available for free of cost. Due to its open source nature we have huge support from open source community and also we are free to share our code with MIT license.
  • Node Package Manager : NPM is the default package manager for node.js. NPM support to create new tools and make it usable for further application. So our new tools will be further utilized in other application as well in very useful way.
  1. Asynchronous: Applications created using node.js are asynchronous means it wouldn’t wait for one thing to finish . So the benefit is if its doing some server processing then you can assign some other task like taking input and both task will keep performing in parallal. So that gives speed and performance.
  2. Developer Friendly: As a developer we have a lot of video, articles, code snippet and community support is available. Also tons of libraries are available through npm.

Advantage of Node Js

  1. One language all platforms means client, server, mobile
  2. Readily accepted by all communities be it php/ ruby/ dotnet/java
  3. Web development in a dynamic language (JavaScript) on a VM that is incredibly fast (V8). It is much faster than Ruby, Python, or Perl.
  4. Ability to handle thousands of concurrent connections with minimal overhead on a single process.
  5. Uses minimal internet bandwidth rather than any other server side programming language.
  6. Rich set of libraries that help us to achieve complex server side functionality with few lines of code . That not only gives better performance but helpful in network environment as well like chat application. Database interaction, file upload etc.

Disadvantage of Node Js

  1. Insecure: the strength always becomes a negative part as well in some scenario. On one hand javascript makes this language faster and improved in terms of performance . But on other hand it’s the drawback of node.js that is based on javascript that makes it insecure.
  2. Lack of maturity: Since it’s a new language and keep on improving with the time but since its also in development mode so we can’t say it’s a mature and stable in all the sense.
  3. Single-Threaded: Node being single-threaded means that one does not need to care about the problems of synchronizing between threads, or shared mutable state. Js has to decide from itself how to deal with concurrency.

Future of Node Js

Node.js (node) has already become more popular on github than Ruby on Rails if you compare it with PHP then PHP is not going to disappear from market but in the long run it could definitely give a good fight. But Yes, Since market needs a concrete application that works for all platform like client, server as well as mobile so the future is bright with MAN (Mongo, Angular and Node).

The following two tabs change content below.

Chandra Shekhar

GCP Architect
Chandra Shekhar Pandey is Google certified Cloud engineer, I am Magento2 Trained developer. Having huge experience in designing cloud solution. I have around 12 years of experience with world enterprise IT companies and fortune 500 clients. During my architecture design I am always caring about high availability, fast performance and resilient system. From the programmer background I have huge experience in LAMP stack as well. Throughout my carrier I have worked on Retail, E-Learning, Video Conferencing and social media domain. The motive of creating cutehits was just to share the knowledge/solutions I get to know during my day to day life so that if possible I can help someone for same problems/solutions. CuteHits.com is a really a very effort for sharing knowledge to rest of the world. For any query/suggestion about same you can contact me on below details:- Email: shekharmca2005 at gmail.com Phone: +91-9560201363

Latest posts by Chandra Shekhar (see all)

You may also like...