Jan 27, 2021

about 2 min read

Will Deno kill Node.js in 2021?

With Deno entering the Javascript playground and stealing the spotlight, everyone is wondering whether Deno can put an end to Node.js in 2021. A question pops up: Is newer always better? This issue has stirred up a whole lot of internet discussions. But for Ryan Dalh - the creator of both Node.js and Deno, it doesn't matter because it would be just himself outrunning his old thinking. 



Deno vs Node.js - Quick Comparison


It all started with Ryan Dalh realizing that there are some certain shortcomings to his Node.js, such as:

  1. Security issues: all system calls are accessible, and this raised a few problems for security
  2. Meta-Build System GYP: made redundant by Chrome but still in use for Node.js
  3. package.json: causing developers to reply on NPM and modules directory concepts 
  4. node_modules: gigantic dinosaur eating the module resolution algorithm alive


And so he went on and created "Deno" - a secure runtime for JavaScript and TypeScript that addresses Node's shortcomings. To highlight the differences and improvements, we have made the table below for you to peruse.



Read more: Flutter vs React Native

Performance Benchmark

The most common usage for Deno and Node is building backend services, for example, REST API's. Let's look at HTTP performance.

HTTP Latency


Maximum latency test. Smaller is better—log scale.


HTTP Throughput

Bigger is better. Percentage compared to Hyper (Rust server)


Deno Pros and cons


From all the information above, we can draw some conclusions about Deno & Node.js advantages and disadvantages


Deno Pros

Deno is faster (check the abovementioned benchmark)

Deno is more secure: access is limited to the outside environment (standard)

Deno is compact, fixes node_modules' heaviness 

Deno is decentralized, no more package manager

Deno is built on Typescript and so we have it available as default

Deno is more up-to-date with fewer issues

Deno Cons

Deno community is expanding but the current volume is about 2% Node.js

Less code available on StackOverflow

Lack of package manager (npm)

Fewer libraries and modules in comparison with npm

Fast to develop, with some inevitable bugs


Read more: Mobile apps vs Web apps

Verdict


We have had our fun weighing the pros and cons of both Node.js & Deno’s. So it’s high time a conclusion is drawn.

 

At this point, Deno is mainly a cool & good enough playground for small personal Typescript projects. According to Dahl, Deno will “never really affect” the success of Node.js. 


But in the future, when Deno is upgraded to version 1.0, it should be a strong option for more complex projects.


Discover more top-notched technologies that Golden Owl offers here and reach out to us should you need professional IT help with building your business' mobile apps or websites.

related blog image

Will Deno kill Node.js in 2021?

about 2 min read

related blog image

7 business benefits of custom website design

about 4 min read

related blog image

90% startups fail and ways to be in the 10%

about 5 min read