5 Apr 2019

Why NODEJS?

Node.js is a platform built on Chrome’s JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.” – This is what the NODEJS webpage says but if you are a beginner then this will hardly ring a bell. So, let me break it down.

Event-driven means that the server only reacts when an event occurs. This allow us to create high performance, highly scalable, “real-time” application. Non-blocking I/O model means that you can run your I/O request asynchronously without blocking your application. In this programming model open/read/write/update operation on devices and resources managed by the file-system don’t block the calling thread. For e.g. A real time chat app, interactive games can be created with very high performance using NODE.

My thoughts :

My feeling is that Node.js is especially suited for applications where you’d like to maintain a persistent connection from the browser back to the server. Doing heavy load on many of the web’s giants, like Ruby on Rails (Ruby Framework) or Django (Python Framework), would create immense load on the server, because each active client eats up one server process but NODE handles this in a different, better way. It’s worth mentioning that Ruby and Python both have tools to do this sort of thing (event machine and twisted, respectively), but that Node.js does it exceptionally well, and from the ground up.

It’s also worth pointing out that Node.js is also great for situations in which you’ll be reusing a lot of code across the client/server gap. The Express framework makes this really easy, and a lot of developers, including me, are suggesting this might be the future of web development.

All I can say from my experience that it’s a whole lot of fun to write code in NODE, and a big part of this is spending less time thinking about how you’re going to plan certain logic. It runs Javascript, so you can use the same language on server and client, and even share some code between them.

Just a fact :

Companies like NetFlix, PayPal, LinkedIn, Walmart, Uber, Ebay, NASA, Google, Yahoo, Mozilla, Github, Microsoft, New York Times, Wall street journal, GoDaddy and many others use NODEJS in production.

The Fun Part :

So why should one be using NODE? Let’s point out the obvious.

  • One of the great thing about NODEJS is, it’s everywhere. Yes, you hear that right. EVERYWHERE! You can write web applications, desktop applications, mobile applications, cloud services, Internet Of Things projects, APIs and many more using NODE.

  • Open Source: NODEJS is an open source platform, which means it is easily accessible and maintained by the best developers around the world. It’s source code is easily available. It is secure, flexible and free.

  • The ever-growing NPM packages: Being an open-source technology, NodeJS has a shared repository of good-to-go tools and modules. The number of modules in the Node Package Manager (NPM) has increased at a exponential pace, overtaking the RoR (Ruby on Rails) gems and PHP bundles. At over 350,000 packages, the npm registry contains more than double the next most populated package registry (which is the Apache Maven repository). In fact, it is currently the largest package registry in the world. In the preceding four weeks, users installed 18 billion packages. Daily 500 packages are uploaded to the npm community. This simply means that you will find what you are searching for.

  • Cross Platform: Node.js is cross-platform means it works on Windows, OSX and Linux. A large number of the Node.js community write Node.js on OSX and then deploy to Linux servers. Applications made from NODEJS also can run on both iOS and android.

  • Lightweight and Extensible: Node.js is based on JavaScript which can be executed on client side as well as server side. Also, it supports exchange of data using JSON which is easily consumed by JavaScript. This makes it light weight as compared to other frameworks. Node.js is open source. Hence you can extend it as per your needs.

  • Easy to Learn: According to Node.js’s 2016 User Survey Javascript is one of the most popular programming languages for front-end development. Nearly every front-end developer is familiar with this universal language. Therefore, it is much easier for them to switch to using Node.js at the back-end. It requires less effort and less time to learn and work with, even for a junior Javascript programmer.


Personally, I love JavaScript and its weirdness. So these were my small thoughts on why one should consider NODEJS. If you are already using or familiar with NODE then leave your thoughts in the comment below and why you use NODE. I would love to read your answers.


Tags:
0 comments