Node.js Review What Are the Best and Worst Aspects of This Popular Platform

Since its original release in 2009, Node.js has become one of the hottest development platforms. It's the most commonly-used framework per a survey of developers by Stack Overflow (the second most-used is .NET), and it powers at least 20 million sites. As a startup founder or project manager, you're probably having discussions about whether you should use this framework for your next project. Whether that's a web app or even a desktop application (Electron), you can use Node.js pretty much everywhere. We aim to help guide those decisions with this in-depth Node.js review.


Content

  • Node.js Review: What, Exactly, is Node.js?
  • What are the Benefits of Node.js?
  • What are Some of the Disadvantages in this Node.js Review?
  • How to Learn Node.js
  • Node.js vs Ruby on Rails vs Django vs Symfony: See Which is Better in Our Node.js Review
  • What Do You Need to Get Started?
  • Node.js Review Conclusion: Choosing Node Requires Some Analysis


There's a lot to love (and hate) about this platform for building fast web applications. As we'll see, though, for the most part, the many Node.js advantages make it one of the best platforms available. Therefore, if you're thinking of building a web app, it's almost always a wise decision to use Node.js as your backend framework.


Node.js Review: What, Exactly, is Node.js?

If you're looking at Node.js for the first time, it's not clear at all what, precisely, this platform does. If you go to their website, nodejs.org, all the home page says is that Node.js is a "JavaScript runtime built on Chrome's V8 JavaScript engine." That's a truthful statement, but it doesn't tell you much about the benefits of Node.js or why someone would want to use this platform.

At its core, Node.js is an interpreter for JavaScript, kind of like the PHP program is an interpreter for PHP scripts and Python interprets Python scripts. It's a runtime environment that effectively takes Google's V8 engine and turns that into a standalone product. The same JavaScript that you run on the web, you can also run using Node.js.

If you have a Node installation, you can see this for yourself. Type "node" into the command line. You'll see something like:


Welcome to Node.js v14.16.0.


Type ".help" for more information.


>


Type console.log("Hello World");

Node.js will print this:


> console.log("Hello World");


Hello World undefined


This example is intentionally simple, of course, but it shows the same JavaScript we all know and love running in your command line.


With this in mind, it becomes easy to see why Node.js took off the way it did. The many millions of developers who have extensive frontend JavaScript experience could port that knowledge to build backend services and applications. Companies didn't need two sets of developers to handle frontend and backend code. Suddenly, for founders, project managers, and the developers prototyping MVPs, Node.js became the natural technical foundation to use.

Over time, Node.js evolved to be an entire ecosystem of inter-related technologies. There's npm (Node Package Manager) which provides hundreds of thousands of open-source packages for people to use in their apps via a simple, intuitive CLI interface. There's Express.js, a minimalist web framework that makes writing everything from web applications to APIs a breeze. Finally, Electron effectively combines Node.js and a Chrome frontend into a single package that can run desktop applications created with JavaScript.

Now, Node.js isn't just a single framework that you can run. It frequently refers to an entire ecosystem of robust, time-saving tools that help developers build and test apps efficiently.

So, with that in mind, let's continue with our Node.js review to see if this tech stack is right for you.


What are the Benefits of Node.js?

If you read the first part of this Node.js review and thought, "That sounds cool and all, but I'm not sure why this is better than any of the other server-side languages," you're not alone. Initially, this may not seem super powerful. After all, JavaScript on the web browser can feel sandboxed and limited. Most people don't associate JavaScript with speed, and running a backend stack (which may have thousands of requests per second) might seem odd, initially, to run on JavaScript.


However, there are quite a few benefits of Node.js. Below are the top five benefits of this platform:


One of the Most Substantial Benefits of Node.js: Using the Same Language for Both Frontend and Backend

As alluded to earlier, one of the most significant benefits of Node.js is the fact that the frontend and backend only use one programming language. The benefits of this become more apparent the more you use the platform.

Consider a typical client-server application. The client calls an API to fetch some data — for this example, let's say that this is user information — and the server returns it in some format. Furthermore, suppose the client expects the server to return the user's name, age, and avatar.

Using a PHP or .NET framework backend and a JavaScript frontend, you would typically have two separate codebases that would specify what this API returns. A .NET application, for example, might define this object as a class with userName as a string, age as an integer, and avatar as a string (containing the URI). There would be an API to take this object, convert it to JSON, and then send it to the client code. The client code would look for the properties using the contract as initially agreed upon when the developers initially created the API.

Now, let's suppose we add a property called "created date" so that the client can display a message thanking the user for being with the service for however many years. We'll need to change this in two places. The client will need to change to expect this property, and the server will need to change it.

Here's where things can get tricky. .NET has a serializable DateTime structure. JavaScript has its version of Date. You'll need to ensure that the data is correct from the database's creation date to what the client displays. If you use a JSON .NET serializer, this should work alright, but it's nonetheless an extra layer of indirection and a potential source of problems.

With Node.js, this problem goes away. A developer can create an NPM package, defining the object for the server to serialize and the deserialization methods for the client. Both the client and server can import this single package, which keeps both sets of code in-sync. Additionally, the entire pipeline is JavaScript and JSON-based, from reading the data from the database to the client's display.

Having a JavaScript client and server code based on JavaScript helps minimize potential bugs, maximize the synergy between client and server, and permit developers to work on both the backend and frontend without context-switching between languages. In short, it's just a more straightforward development paradigm.


Another of Node.js Advantages is that it is Scalable

Node.js is fast. This often comes as a surprise to developers and non-developers alike. People with a long history with JavaScript often think of it as a slower technology.

However, that's an old way to view it. Modern JavaScript is fast. Specifically, Google has spent a lot of time thinking about V8 performance and finding ways to enhance it. And, unencumbered by the entire browser, Node.js can make further tweaks and enhancements to get the engine to run even quicker.

What this means is a fast and scalable architecture. Real-world testing frequently shows that Node is more rapid than PHP and Java — two popular server-side languages. It's also quicker than ASP.NET (although .NET Core does give Node.js a run for its money in terms of speed).

As we'll see in this review section that discusses the disadvantages, Node.js — like all JavaScript applications — is single-threaded by nature. However, there are tricks to using multiple cores. The simplest way to get Node to use more than one core for a web server is to have child workers listen to the same port (the Cluster module handles this). Insert one child worker per CPU core, and you can take advantage of all your CPU cores.

These types of tricks show the extensibility and scalability of the platform. Most people find that Node.js apps run exceptionally well.


Many Prominent Companies Back and Use Node

Earlier in this review, we mentioned the Node Package Manager (npm) that most Node applications use. This service has a parent organization of GitHub, which Microsoft recently purchased. The OpenJS Foundation, of which Node is one of their products, receives backing from Google, Microsoft, Netflix, Red Hat, IBM, GitHub, GoDaddy, Bloomberg, and many other large companies.

Node has quite a few prominent websites that use it, including PayPal, Groupon, Wall Street Journal, Ancestry, Zendesk, and Yahoo. Many other companies probably use Node.js in some additional capacity. Indeed, anyone that builds an Electron-based application uses a version of Node.js.

The bottom line is that Node has a strong corporate backing. This platform isn't going anywhere and is continuing to undergo active development. Therefore, anyone seeking to start a project using Node should feel comfortable with that decision.


Node.js Review: One Major Advantage is All the Packages

In April 2020, npm crossed the 1.3 million mark for the number of packages hosted on the platform. That's 1.3 million packages that any Node.js developer can avail themselves of to make prototyping, development, deployment, and testing easier.

Essentially, if there's something you want to do with Node.js, there's probably a package to help you.

If you need to write a simple API, you may wish to consider Express.js. Are you looking to do some scientific calculations? Well, there's rlab, a library that emulates R. Media encoding? Yep, you can use beamengine, a Redis-backed cloud media processing engine. Or, if you use Azure, you can use datafire's offering (you can even use this for 1900 other APIs.).

No matter what you're looking to build, there's a good chance that there's a package available on npm that can accelerate your development and ensure higher-quality code.

To this end, many people combine Node.js with TypeScript, a typed JavaScript transpiler that provides many useful features that vanilla JavaScript doesn't have. Created by Microsoft, TypeScript helps to ensure better code by enforcing typing rules that can cause vanilla JavaScript problems at runtime.

The npm repository is arguably Node's greatest strength. It's truly an example of leveraging open-source's power to build quality applications faster and with higher quality.


Node is Simple to Learn

This advantage is, of course, subjective. However, most people find Node relatively intuitive. If you have done any form of frontend web development, you probably already know a little bit of JavaScript. And, for better or worse, JavaScript tends to be one of the easier languages to pick up because it is relatively "forgiving." There isn't too much to remember for straight JavaScript programs; here's no public or private, no typing, no compilation, and no complicated or costly IDEs.

Anyone with a text editor (or a free IDE like Visual Studio Code) can begin writing Node.js applications.

It's also worth noting that Node.js has a lower barrier of entry. For starters, it tends to run pretty well on almost all hardware. It doesn't take up too much memory (there are ways to run Node with even 128 MB of RAM).

And, there are plenty of tutorials on Node.js. The official documentation for this platform is quite good. You can find courses on popular learning sites like Pluralsight for Node.js too.

Ultimately, this means that one of the benefits of Node.js is that it is accessible to all. Developers from all walks of life — even those that may not have the best internet connections or computers — can begin to learn how to code in Node.js. In turn, this leads to a more vibrant, diverse community of developers that can potentially work on your application. That's a big win for us in this Node.js review.


What are Some of the Disadvantages in this Node.js Review?

While Node.js has some positives, no platform is perfect. There are three areas, in particular, where people may find Node.js to be a little more challenging to use.


Performance Bottlenecks for Certain Computational Tasks

In this Node.js review, we already mentioned how single-threading could sometimes be a performance issue. While it's usually pretty easy to bypass this for serving requests, there are other potential performance bottlenecks for heavy computation tasks.

Consider how a single-threaded environment plays out with a task that requires heavy computation. Let's suppose you have a service that lets a user upload an image and

perform some processing on it (maybe your service makes the image brighter or makes the color appear more natural).

If you implement this the quickest way, you'll have an API with some pseudocode that looks like this:


Wait For Image


Process Image


Return Image


Wait For New Image


Here's the problem, though. Since Node is single-threaded, this simple implementation will block the main thread while the image processing completes. If a user uploads image A, then the API will be unresponsive until A's processing is complete.

To solve this problem, you'll need to spawn a child process to do the image processing. However, you'll need to use interprocess communication to communicate the results between the two processes (remember, these aren't threads but official NodeJS processes with more overhead to spin up).

Ultimately, with enough experience, you'll know exactly how to ensure your app gets peak performance — even with heavy computation. However, given Node's constraining single-threaded architecture, you may find that you have a bit of a learning curve if you come from another language, like C, that makes threading a breeze.


Node.js Review: Immaturity of Tooling

While Node.js has been around for a while, its usage didn't pick up until relatively recently. Its growth exploded around the 2016–2017 timeframe, so many of the tools that developers use are comparatively immature (for example, the Microsoft .NET and Visual Studio toolsets have been around for decades).

Additionally, many people use TypeScript to add many excellent features to JavaScript, but it didn't see its first release until October 2012. Much like Node.js, it didn't hit its stride until a few years later, when the demand for Node.js picked up.

Therefore, it's not entirely unheard of to run into issues with the tooling. Node modules may conflict, TypeScript may compile something with an unintended side effect or incorrectly check some types (there's a reason why TypeScript has a @ts-ignore property.).

It's worth noting that these are not common issues, and indeed, they should not be a deterrent to using Node.js. However, it is something we needed to point out in this Node.js review. Please keep it in the back of your mind when selecting Node.js as your preferred platform (and for devs when creating estimates for how long work will take).


Finding and Hiring Developers

Since Node.js has had a significant increase in popularity recently, finding and hiring developers has also become significantly more challenging. High-quality Node developers are some of the most sought-after in the industry. These developers often find themselves able to work for big multinational tech companies to startups to everything in between. There's no shortage of work for the best Node.js developers out there.

Since Node.js can be a little trickier to work with (especially if you want to achieve top performance), finding and hiring the best developers becomes vital if you have a computationally-intensive application in mind.

If you are a founder or project manager looking to figure out whether or not to use Node.js for your next project, this is something to consider. Finding quality developers for Node.js will be much more challenging than finding developers for some of the other less-used tech stacks. That's not to say that there aren't good Node developers out there — there are many of them. However, you'll find yourself in a lot of competition. You probably won't be the only company or startup interested in them.

Fortunately, if you find yourself short on Node.js developers, you can always outsource the work. Indeed, some companies see the outsourcing model as more sustainable and predictable long-term than hiring talent in-house.


How to Learn Node.js

If you're interested in learning about Node.js after reading this Node.js review, you should know that there are quite a few free or low-cost resources that will make your journey significantly more straightforward.

First, start with the official documentation. Node has an extensive set of very detailed docs. If you want to know how something works on the platform, the official documentation is the place to go.

Next, consider reading some documentation and tutorials from trusted sites. W3Schools has an excellent Node.js tutorial that can help developers learn how Node works under the hood. It starts by explaining how to create the most basic of servers (no third-party frameworks). That is a great way to learn how Node.js works.

Even sites like Visual Studio Code have Node.js tutorials. These IDE-specific tutorials will help walk you through the basics of debugging and setting up a Node app.

If you feel that you might learn better by watching some more formal instruction, consider the courses available on Pluralsight or Udemy. These will give you a more in-depth look at the world of Node and provide more structure to your learning.

Finally, consider browsing places like Stack Overflow for questions related to Node.js. Sometimes looking at what other people are asking and looking into the solution yourself or reading what others suggest can be a great way to learn more about a platform.


Node.js vs Ruby on Rails vs Django vs Symfony: See Which is Better in Our Node.js Review

The four most popular web application frameworks are arguably Node.js, Ruby on Rails, Django, and Symfony. If you're debating about which one to use, here are the top pros and cons for each platform (including which type of app might be best suited for each tech stack).


Node.js

Node.js Advantages: Node is fast, efficient, has a large community, and has strong corporate backing. Although Node itself is minimalist in what it includes, there's so much that npm comprises that you can write practically anything with it.

Disadvantages: Computationally-heavy tasks can be difficult to code. The asynchronous model can sometimes be challenging to learn.

Best For: Node.js is best for web backends that are not necessarily computationally-intensive. Node has a lot of speed, making it perfectly suited for a backend API that acts as an abstraction for your business logic.


Ruby on Rails

Advantages: Ruby is a simple, straightforward language. Rails tends to be suitable for fast development. Ruby also has Gems, which act like Node's npm repository.

Disadvantages: Ruby doesn't scale as well as Node. While it's possible to make high-performance applications with Ruby, it's most definitely more challenging than Node.

Best For: Sites, where scalability isn't as much of a concern, will benefit from Ruby's fast development and prototyping. Rails works well for MVPs.


Django

Advantages: Django is one of the more comprehensive frameworks available. It creates a structured, secure, easy-to-modify app that works and scales well.

Disadvantages: For many uses, Django comes with a lot of stuff that you don't need. You might not need a user system or some of the middleware. While you can customize some of that, it's still not as flexible as Node.

Best For: Simple sites that need an admin panel and user system. Django also works with multiple database backends, which can be beneficial if you have a requirement to use a specific database provider (e.g., your company uses Oracle exclusively).


Symfony

Advantages: Symfony is a fast, efficient PHP framework that is scalable, stable, and works well for large projects. Twig, Symfony's templating engine, is remarkably impressive.

Disadvantages: Like Django, Symfony includes many things that your app may or may not need. It naturally supports many CMS features that you may or may not need. If you're writing a backend API, the ability to do templates isn't that useful.

Best For: Frontend sites that need templating and other CMS functions. There are reasons why websites like Yahoo Answers, Dailymotion, and National Geographic use Symfony.


What Do You Need to Get Started?

If you are looking to get started using Node.js, here's what you'll need:

  • The latest copy of Node.js. Node works on Mac, Windows, or Linux, so no matter what platform you have, you'll be able to run this platform.
  • It's usually the simplest to get started with the official documentation, so pulling that up and keeping it open in a browser is always a good idea.
  • You'll also need an IDE. While there are many to choose from, most people tend to use Visual Studio Code or Atom.
  • The relevant frameworks. If you're just getting started, Express.js is usually an excellent place to begin. You can add and research other frameworks as you need them.

Once you have all the components above, you're all set to begin diving into the world of Node.js.


Node.js Review Conclusion: Choosing Node Requires Some Analysis

There's a lot to like about Node.js. With the right project, it's fast, efficient, and super easy to use. One of the many Node.js advantages is the fact that it is conceptually quite simple. It takes what you know and love (and potentially dislike) about JavaScript and ports it to a fast, simple engine. The V8 engine that Google has worked so hard on

fine-tuning shines when put on the backend.

That makes it easy, on the whole, to recommend Node as a technology stack to use when building a new web or desktop application.

However, given that Node.js has some less-than-ideal traits, you have to weigh Node's advantages and disadvantages for your particular application. Other frameworks may work better for some use cases (like Django's admin panel and user system that comes out of the box).

At Impressit, we have experience with Node.js and its competing frameworks. If you currently have a Node.js project or you would like to figure out if Node is the right tech stack for your future project, please contact us. We would love to learn more about your project and see how we can make Node (or another tech stack) work for you.