5 Reasons Node.js Matters For Devs

Written by Santiago Mino
Technology

As we’ve written here before, JavaScript is a powerhouse programming language, used on more than 97% of all websites online today. But that doesn’t mean it’s easy to learn or write, or that it can be used to solve every web development problem or used in every development context.

Enter Node.js.

Developed by American software engineer Ryan Dahl in 2009, Node.js serves as a kind of bridge between backend JavaScript and server-side uses, allowing early-career devs and other non-specialists to begin using JavaScript in more instances, as well as more experienced and advanced devs to write code, easily and quickly, which crosses the barrier for JavaScript between the server and the browser efficiently and without significant hassle or the addition of new languages.

In even simpler terms, Node.js allows the client (or user, “web-surfer,” like you and I), to speak to the server (the backend, the company, the code), and vice versa, making for more dynamic data exchange and interchange -- meaning the client can make requests of the server, and the server can push information and requests back to the client. Like a dynamic conversation online.

Sounds obscure? Maybe abstractly. But Node.js is an integral part of the development experience for quite a few “big box” companies, and if you use streaming apps, ridesharing apps, or web services, you’ve been interacting with Node.js already. Probably every day.

Ever heard of AWS, PayPal, LinkedIn, Groupon, GoDaddy, Walmart, Yahoo!, Uber, or Netflix? If so, you use Node.js. Because they all use Node.js to bridge their servers to your browsers.

Here are some top reasons why Node.js is worthwhile for all devs to explore, navigate, and use:

Reason #1: It’s Streamlined

Let’s get technical for a minute. One of the essential functions that make Node.js powerful, is the way it handles data requests. Unlike traditional “web-serving” techniques, wherein each connection request sends a new thread between server and app -- which takes up RAM and runs the risk of slowing down every operation -- Node.js’s great innovation is that it operates requests in a single thread (what can also be called “non-blocking I/O calls”).

This means Node.js is built to handle tens of thousands of “non concurrent connections” in one event loop -- or one sequence. For devs using Node.js, this innovation allows for less wait time, far greater processing speed, and more capacity for scalability (reaching over 1 million concurrent connections in some tests).

It’s not ideal for everything (intensive computational demands can clog that single loop, potentially even crashing the whole program!), but it has true potential for building powerful applications and in-browser programs, as we’ve seen with much-used platforms like those developed by Netflix and GoDaddy, to name two examples.

5 Reasons Node.js Matters For Devs

Reason #2: It’s Chatty

Chat apps are an ideal example of how Node.js can be used to enhance a user experience within a web server or app. Because Node.js provides the ability to write back-end code in JavaScript, it’s a perfect technology for writing real-time applications -- of which the chat app is a prime use case (Yahoo! Messenger is an example of a contemporary chat app using Node.js). And since users expect chat apps to function in real-time and to be fast, Node.js works perfectly for this kind of program.

Here’s an example of how you can use Node.js to build a chat bot with socket.io:

Reason #3: It’s Quick

Sharing JavaScript across front-end and back-end means speed -- there’s nothing simpler about Node.js. As a runtime environment, Node.js allows developers to execute code on the server-side straight from their browsers, which makes it light, scalable, and, most importantly, fast.

This was especially important for Uber, who wanted to build a ridesharing app that could be used simultaneously by millions of clients seeking rides around the world all at once. For Uber, Node.js was ideal for these three reasons:

  • It processed large amounts of data quickly and reliably
  • Convenient error analysis and quick code deployment
  • Constant technology improvement due to open source community

Currently, Uber is able to process over 2 million “remote procedure calls” (i.e individuals asking for rides) in unison -- using Node.js. For those following at home: that’s very, very fast.

Reason #4: Less Code

One benefit major players and newer devs will find when exploring Node.js is that it allows programs to be written with far less code than might be required otherwise. A prime example of this is PayPal, the dominant worldwide payment and banking application. PayPal’s service is used by over 200 million active users, both on browsers and in their Android and iOS applications. This means a great deal of functionality depends on the efficiency of the code which supports it and which crosses between these two user communities.

In the past, PayPal had two engineering teams, and asked those teams, who often worked in silos, to ensure their two domains worked well together. In other words, those coding for the browser (in HTML, CSS and JavaScript) and those coding for the app (using Java) had to construct a bridge so that functionality across both worked seamlessly.

Needless to say, this involved a lot of code, and a lot of work.

When they switched their entire backend to Node.js, and were, therefore, able to write everything in JavaScript, this reduced the amount of code they needed by 33%, and unified their engineering operations into a full-stack model. The result? Less code, less issues, less work time.

5 Reasons Node.js Matters For Devs

Reason #5: It uses NPM

NPM has been called the “the most prized possession of Node.js community” -- and here’s why: it is the most popular and largest software registry in the world, and it's exclusively for enhancing the usability and potential of Node.js.

What does that mean? It means Node.js has a built-in super power -- there’s no need to start from scratch when building with Node.js, as registries like NPM host millions of examples, apps, lines of code, and packages which any dev can use to jumpstart any project.

So with its support for package management and NPM, Node.js is a dev’s best friend. NPM contains millions of downloadable libraries which are all absolutely free so that developers, new and old, experienced and beginner, can find pre-built and downloadable code offering a “public collection of packages of open-source code for Node.js” including “front-end web apps, mobile apps, robots, routers, and countless other needs of the JavaScript community.”

5 Reasons Node.js Matters For Devs

If you’re interested in exploring Node.js further, or in speaking to the top 3% of Node.js, JavaScript, and full-stack devs in Latin America, Jobsity is standing by and eager to chat. We’re specialists in full-stack development and are excited to share our knowledge with you -- or to help you build your own team of nearshore Node.js developers. Don’t hesitate to get in touch!

--

If you want to stay up to date with all the new content we publish on our blog, share your email and hit the subscribe button.

Also, feel free to browse through the other sections of the blog where you can find many other amazing articles on: Programming, IT, Outsourcing, and even Management.

Share
linkedIn icon
Written by Santiago Mino
LinkedIn

Santiago Mino, VP of Strategy at Jobsity, has been working in Business Development for several years now helping companies and institutions achieve their goals. He holds a degree in Industrial Design, with an extensive and diverse background. Now he spearheads the sales department for Jobsity in the Greater Denver Area.