DEV Community

Cover image for What is Deno, Do you think it will replace Nodejs?

What is Deno, Do you think it will replace Nodejs?

icode247 profile image Ekekenta Zion Updated on ・3 min read

What is Deno, Do you think it will replace Nodejs?

Deno is a runtime for JavaScript and TypeScript that is based on the V8 JavaScript engine and the Rust programming language. It was created by Ryan Dahl, original creator of Node.js, and is focused on productivity. It was announced by Dahl in 2018 during his talk "10 Things I Regret About Node.
It is built because of all the problems and old technologies used in building Nodejs.
Deno is the recreation of Nodejs with similar syntax but does more things than Nodejs.

The pros of Deno over Nodejs

  • Deno has built-in typescript support, for developer who use typescript, Deno takes care of all the configuration required to compile your code.
  • Deno has a better compactibility and imports using the normal brouser impor and and export statement.

    import { serve } from "";

  • All Deno function are promise based. Unlike Nodejs that supports callbacks.

  • Deno has all the brouser api you can think of built built into it. Which means you can run your code inside the brouser or outside the brouser using Deno.

  • With Deno you don't have to relearn things. This is because the code you write in the brouser is the same with the code you write in Deno.

  • Deno has more standard libraries built-in into it, unlike Node were you need to install using npm.

  • Deno is way more powerful than Nodejs in handling security issues.

  • Deno allows you import and use packages outside npm. As long as there is URL leading to that package.

  • In Deno there is no package.json file for managing dependencies and there is no node_modules folder. All of that is been handle for you, and all your dev dependencies are stored in central location in your system.

Now the big question.

Will Deno replace Nodejs?

I have to say right now, that not going to be the case. I know Deno is cool and have alot features coming to it.
Deno is still in its early stage, the version one was just released which means that all the things that Deno is trying to do is been worked on. The brouser compatibility is still not 100%, they still implementing brouser APIs and they will continue to implement those as time goes on.
I mentioned that Deno is not going depend on NPM to install packages, that is little bit of downside for now, because JavaScript is based around npm. There are so many npm packages out there and the problem is not all of this packages are going to be compatible with Deno out of the box if they rely on for example node based apis, Deno doesn't have all the node based apis yet and that's a problem because npm packages are not going to work with Deno.
With all this in place moving to Deno make you missing out on a judge portion, which still makes Nodejs more popular also the reason why I think Deno will take a while before taking off.
If people starts writing code with Deno or as soon as Deno starts implementing all those Node based package which allows you to take packages from npm actually use them in Deno, That's when we are going to see Deno start to take off and starts to become more popular runtime as time goes on.
For all of this to be fully implemented will take a lot of time, not even a week or a month. It is something that is going to take a few years , "maybe five to years" before companies can adopt Deno to replace Nodejs. Because I don't think that Deno will replace Nodejs in that five to ten years interval, Nodejs is still going to stick around and used to build applications all over the world. So replacing a huge application with Deno doesn't make sense.
In conclusion, I think Deno is a cool and new way to look at JavaScript. In a couple of years Deno will start to fill all this gabs that are missing and people are really going to start using Deno seriously.

Discussion (0)

Forem Open with the Forem app