Top 3 Node.Js Flaws
Top 3 Node.js flaws
Akbar S. Ahmed | Mar 3, 2015

What is wrong with Node.js?

What are Node.js’ weak points. Every language/platform has weaknesses, and Node.js/JavaScript are no exception. There are a few primary critiques of Node.js/JavaScript that are raised repeatedly:

  1. JavaScript has quirks
  2. You cannot build large applications in JavaScript
  3. JavaScript lacks type safety

As a company that uses multiple languages in production, we like to evaluate potential problems with our technology choices to see if there is a better alternative. We will discuss the truthyness of each assertion below.

JavaScript has quirks

Complaints that “JavaScript has quirks” fade as a developer learns the language.

To be fair, we were guilt of making this complaint when we first started developing JavaScript heavy SPAs, and long before we started with Node.js.

Over time, we found that “JavaScript has quirks” is a developer’s way of saying “I don’t understand how JavaScript works, and it is not behaving like another language that I know”.

You cannot build large applications in JavaScript

First we need to define what a “large application” is. For our purposes, a large application is one that has multiple major sections of functionality.

We have large applications in JavaScript that have been perfectly maintainable over the past 2 years. However, our “large application” is actually a set of small modules combined together.

Our findings have been that Node.js forces good software practices of composing our application of many small modules where each modules has tight cohesion and loose coupling. Of course, this is not unique to JavaScript or Node.js. We follow similar forms of composition in both Java and Python.

One of our best practices has been to aggressively limit scope in both our server-side and client-side JavaScript. Limited scope combined with small modules has proven to be good both for the development of and maintenance of large JavaScript applications.

Type safety makes development safer

In production, we have yet to run into a single problem in our Node.js applications due to the lack of a strong type system.

Type safety is an interesting topic. In practice, we’ve found type safety to be both helpful when present, and unnecessary when not. More specifically, we carefully choose the language for each project to fit the task at hand.

In production, we have yet to run into a single problem in our Node.js applications due to the lack of a strong type system. That said, we use Node.js for our customer facing APIs where ease of working with JSON is more valuable than a strong type system.

Conclusion

A huge plus of Node.js is the community’s intense focus on developing web development tools and libraries.

Node.js will continue to be one our primary technologies for web APIs in the UI/UX layer. While its not perfect, Node.js is an excellent choice for edge of network APIs. In our experience, the Node.js community has a strong focus on web development which means that it is ahead of other technologies in this area.

While we wish there was less drama in the community, we have found any technical issues to be manageable and the benefits of Node.js (i.e. rapid development) to be substantial.




Subscribe to our newsletter

Contact Information

ABOUT EXPONENTIAL.IO

We specialize in helping professional developers, like you, expand your skill set. Our courses are focused on enabling you to learn everything necessary to use a new technology in a live, production application.

LOCATION

All courses are made with love in
Palo Alto, CA.

Subscribe to our newsletter