Is Node.js dying?

Is Node.js dying?

In the last couple of days, a new discussion about Node.js has surfaced after the first Deno release. In social media and technical forums, many developers are now talking about the destiny of the Node.js. And even some speculating that Node.js is going to die soon. Or eventually will. While I am not a foreteller, I have some insights to share with you. I particularly try to answer the “Is Node.js dying” question. I cover how the current panic over the death of Node.js is irrelevant even though there is supporting evidence for it.

Introduction

Whenever a language or technology is born, many immediately start to talk about its death. You don’t believe me? Just open Google and type

is [put a language or technology] dying?

Literally, for any technology, you can find a bunch of articles that unarguably many are trash. Even for new technologies such as Kubernetes. Node.js is not an exception, either. But what heated the “Node.js death” topic is the first release of Deno.

If you don’t know what Deno is, just read the next section to have an idea about it. That helps you understand the atmosphere over the current panic.

What’s Deno?

Deno is a Javascript runtime written by the Node.js creator, Ryan Dahl. The name is the natural sort of the word “Node” 🙂

The project was announced by Dahl in 2018 during his talk “10 Things I Regret About Node.js”. The Deno is written in Rust, by the contrast of Node.js that is written in C/C++.

Deno has a single execution file with the zipped size of ~15 MB, at the time writing this article.

Beautiful Deno
Beautiful Deno

Additionally, it does not have an NPM like or a separate external package manager. It’s built-in.

Deno runs in a sandbox mode (means no direct access to file, network, and other IOs), so any permission should be explicitly given.

And for the typescript lover, Deno supports it by default.

Why discussing the death of Node.js?

The main reason that suddenly start to think that Node.js is dying because version 1.0 of Deno released on 13th May 2020. Even though the project is been around for over two years, this release caused panic for Node developers in social media.

Needless to say, there are lots of differences between Deno and Node.js. And Deno is not necessary a Node.js replacement (as of now), but many panicked anyway. I categorize the fear reasons and go through each separately.

Same father argument

One of the main reasons for the current situation is because both products have the same creator. And many think that Ryan Dahl won’t spend any time over Node. Thus, Node.js is dying.

While this is a valid assumption, it is fundamentally wrong. Node.js has a gigantic community that is much larger than many others. Thus, it is not a single person project.

On the counter-argument, some compare Dahl’s existence to Node.js with Linus Torvalds’s existence to Linux. I tell you, that’s not a correct comparison at all.

First of all, Dahl has not been involved with Node.js since 2012. But Torvalds’s been working on Linux over the last 30 years in one form or another.

Second of all, there’s no guarantee that even if Torvalds leaves the Kernel community, Linux will die. And also don’t equalize the September 2018 mayhem in the Linux community with the Torvalds exit. The 2018 chaos was a dark monstrous event that a part of it was about Torvalds qutting.

Lastly, Torvalds also created Git but is not maintaining it. He just handed over entirely. Has Git died?

Node.js community is the graveyard of unmaintained libraries

Node.js community has a reputation for being a graveyard of unmaintained libraries. With no offense, the number of libraries that are born or die everyday outnumbers any person’s cells.

Every other day a new framework is created that becomes the community defacto for sometimes and then out of the blue, it goes unmaintained. With a quick search, you can find dozens of them in GitHub with many stars that no one is maintaining them.

One may say if this is the current situation in the community what makes us think the same won’t happen to Node.js?

The answer is it depends. It depends on the community and corporations’ supports. Not necessary through monetary funding, but more contribution and support wise. If the companies that are extensively using Node.js hire some people to actively contribute to the project, then the death of Node.js is almost impossible. Let me give you an example. Java’s been around for 25 years. Besides its massive use on almost all devices, one of the reasons that Java longevity is due to corporations’ support. Not only the Oracle’s but also Amazon’s, IBM’s, and many other companies’ support.

But let’s not forget that many companies use Node.js are startups that mostly have short lifespans and are on tight budgets. We can’t account for those companies’ contributions. It requires a big, wealthy company like Facebook or Google.

If the community diverge and/or big corporations do not support Node, this is a valid concern that can put Node to the decline path

Deno is much better than Node.js

Of course. That’s true. Wealth of experience and knowledge gained over building Node.js. So there’s no surprise if Deno is better. But a technology is not only evaluated by its capabilities. That’s just one of the factors. Usage and support are more important players. And Deno is not quite there because it is young. So node.js won’t be dying immediately.

But let’s assume the worst. Then what happens? Read the next section for that 😀

What if Node.js dies

In my research, I’ve found that some people discuss the death of Node.js as if a person has just died. Well, the death of a language or technology is not the same as a person passing. It doesn’t happen in a day.

Change of technology usually takes years because companies can’t replace their products overnight or in a month and then switch to a new one. Node is not an exception here. Node.js libraries don’t work with Deno and it takes time to build. Also, don’t forget about expertise availability. Currently, not many people are familiar with Deno to built production scale products. All of these will take a few years at least.

Node no chance!
Node no chance!

Even if the Node dies sooner than anticipated, there would be a job market for it. Of course not similar to COBOL. But at least for the next 5 years, there are jobs for it. That should provide enough buffer to Node developers to switch. Also since both Deno and Node are related to the JS world, switching from one to another won’t be tedious.

Conclusion

Node.js is not dying at least for the next five years and the current argument over its death in social media is meaningless. While there are some speculations over its decline, none of them so far are definitive. Even assuming the worst against Node.js and in favor of Deno, companies still need time to switch to the new technology and libraries need to be built. If you are worry or even curious, I highly recommend you start to toy around with Deno.

In the end, I want to clarify that I have no issue with Deno. It is a good project with a bright future. My intention in writing this article is not to diss Deno but to alleviate Node.js developers’ stress.

Update-1: If you are interested in Deno, check my latest tutorial that I show how to build REST APIs with Deno and Oak.

Update-2: Chinese translation of this article on InfoQ

Inline/featured images credits

  • Node.js logo by Node.js
  • Dino in the Rain by Deno on GitHub
  • Distracted boyfriend meme image by Antonio Guillem
  • Batman slaps source is from a 1965’s World’s Finest Comics #153 by Edmond Hamilton, Curt Swan and George Klein) according to here.