DEV Community

Wahaj Aayani
Wahaj Aayani

Posted on

Is Node.js still relevant?

Here's a talk back from JSConf 2018 that got me intrigued - 10 Things I Regret About Node.js - Ryan Dahl - JSConf EU where Ryan Dahl is discussing his reasons of abandoning the whole Node.js project. And truth be told, this was the first time I came to know that - the stack that I have chosen to adopt professionally was already a foundling long before I knew about it.

Background

Ryan Dahl (creator of the original Node.js runtime) lost his faith in the Node project upon realization that the things aren't what he initially thought them to be when he laid it's foundation in '09. Here he's discussing some of those thoughts and regrets. things that could have been done better, but now it's far too late and community is already thriving on one man's mistakes.

What Now?

After breaking off his strings from Node, Ryan started working on a new runtime all the while building upon his learnings from the poor design decisions in Node and taking care of all past shortcomings. And it's in this very video that he reveals a prototype for that - Deno. Now Deno was initially released back in 2018, but the first stable release came out just few days ago (May 13) and it's already turning heads in the community. Unlike Node which is in C++, it was initially written in Go, but soon replaced with Rust due to concerns over double runtime and garbage-collection pressure.

Deno v. Node

  • Uses ES Module as the default module system, instead of CommonJS
  • Uses URLs for loading local or remote dependencies, similar to browsers
  • Includes a built-in package manager for resource fetching, thus no need for NPM
  • Supports TypeScript out of the box, using a snapshotted TypeScript compiler with caching mechanisms
  • Aims better compatibility with browsers with a wide range of Web API
  • Allows control to file system and network access in order to run sand-boxed code
  • Redesigns API to utilize Promises, ES6 and TypeScript features
  • Minimizes core API size, while providing a large standard library with no external dependencies
  • Using message passing channels for invoking privileged system APIs and using bindings

While it's still early to say anything about Deno's efficacy in production and practicality in real-life applications, but we have an emerging player staring from the horizon ready to take on the future, and a foundling that appears to stand on a losing ground, but will not go down easy.

Top comments (0)