Why Deno won’t to Replace NodeJS

Dominic Aidoo
Geek Culture
Published in
6 min readMar 8, 2021

--

I can very vividly remember when I first got introduced to JavaScript by way of AngularJS. Researching different web development frameworks some years back, I chose AngularJS at the time as it was just beginning to gain traction in the industry, and the community was growing. Then shortly after, NodeJS, the runtime which allows JavaScript code to be run outside of the browser, also began to start gaining attention. Fast-forward to today, as we can see how much NodeJS has grown across the software development world, with it being a popular choice for not only frontend development, but now in a lot of cases, backend, server-side development as well.

And now, we also have the “successor” to NodeJS available now, Deno.

Deno is created by the same creator of NodeJS (Ryan Dahl), with a focus on enhancing the missed opportunities in NodeJS, like security, and the central repository system used to handle modules, npm.

In the current web development landscape, we’ve seen some frameworks start to become popular in with regards to building server-side applications, like Next.js, NestJS, Koa, Meteor, for NodeJS just to name a few. I personally have started to experiment with the NestJS framework while building some services in NodeJS, in order to get a feel of developing an enterprise-level server application with a framework. But I believe Deno is still quite some time away before we see more complete frameworks for the development of applications for Deno. In general, Deno is still relatively new to the web development world, so we should be giving it not only time to grow, but the room as well to grow outside of something more than just “a replacement for NodeJS”. Let’s discuss some points which should be considered when comparing Deno with Node.

Maturity

Most likely the biggest point about not moving to work with Deno right away, is how fresh and new it is. Being initially released in May of 2018, I myself did not get wind about Deno until late 2019/early 2020. The latest stable release is at v1.8.0 now (at the time of writing this article), and was written mainly in the programming language Rust, which itself is a relatively new programming language, when compared to others like JavaScript, C++, and C to name a few.

This novelty currently surrounding the current Deno ecosystem will need some time to grow, in order for developers to be their most productive when programming. For example, the vision for Deno modules, is to have a core set of modules, developed and maintained by the Deno team themselves. However, this list of modules is not very long currently.

List of core Deno modules as of March 3rd, 2021

What we can expect in the future from these modules is that they will have defined support from the Deno development team, which would have best the practices of Deno applied to these modules as they are updated and developed. However, this limits how developers interact with 3rd-party modules that they may want to use, which are developed by the community outside of the core Deno team. There are 3rd-party modules that are available today, a lot of which may already be familiar because they are essentially NodeJS modules ported to be available in Deno. Some of these are: lodash, axiod (Deno version of axios), and denon (Deno version of nodemon). All these 3rd party modules are hosted at the deno.land/x domain, so it is easy for developers to reference 1 place for all 3rd party modules.

When compared with the current state of NodeJS, which has been around since May 2009, and written mostly in JavaScript (around for 20+ years), Deno is just a baby starting to crawl; it is now at v15.0.0 at the time of this writing. npm, the default package manager for NodeJS, has many libraries available, written by developers in the NodeJS community. It is this open-source community support which really drives NodeJS forward in the industry, where the it is even adopted by big companies today, such as Netflix, Microsoft, AWS, Walmart, to name a few.

Today, you can find a multitude of examples, or answers to any issues you run into with NodeJS as shown from the shear amount of results you’ll get back from say, StackOverflow. With Deno, you would be hard-pressed to to find the same, seeing as everything is still new, and developers are still getting comfortable in Deno ecosystem itself.

Tools

Another big topic of discussion would be the tools currently available to help develop Deno applications. As NodeJS has npm as it’s package manager, today, there isn’t really a package manager for Deno. It allows you to import modules from URLs directly into your code, but without a manager to help like npm, or even a file to help describe the projects dependent modules (like package.json), it seems like a bit more work to manage any modules that would be need in Deno. Although, the pain-points of npm with regards to security is what Deno tries to resolve this with introducing this new paradigm, I do think it would get difficult, as you list of imports grow. There is a Deno module out there available today which helps to ease this problem (https://github.com/crewdevio/Trex), which is currently unstable, but does seem like this would be quite an ideal way to manage the external modules needed for a Deno project.

We are starting to see some full stack frameworks being developed for use in Deno, like Aleph.js, a React framework which runs in Deno. Aleph.js takes inspiration from Next.js, so I would not be surprised to see other frameworks begin to come up intended for use in Deno, that take existing ideas from more matured NodeJS frameworks (NestJS, MeteorJS to name a few that I personally would be interested in).

Support

Support for Deno is also relatively new. IDEs like Visual Studio Code, Atom, and WebStorm do support the Deno runtime, but not out-of-the-box. Usually, some sort of extension or plug-in is needed in order to support using Deno.

There is this extension for Visual Studio Code (https://marketplace.visualstudio.com/items?itemName=denoland.vscode-deno) which I have used to try and setup a small project in Deno. There is also this JetBrains plugin available. (https://blog.jetbrains.com/webstorm/2020/06/deno-support-in-jetbrains-ides/). You of course, by all means, are not stopped from writing applications in some basic text editor, and executing the code using deno run, but having the support of your favourite IDE to get things like auto-completion and syntax checking done, before you run your code will save you a lot of effort and time.

Conclusion

The community surrounding Deno is quickly growing, seeing how best to go forward into the future. I actually do see the Deno community continuing to grow into the coming future, but maybe not quite in the way we expected it to when we were first introduced to it. The excitement of a new technology which was stated to pick-up on the shortcomings of NodeJS, may have initially gave us the feeling that Deno should be a replacement for NodeJS. However, I don’t think Deno will take over the role of NodeJS, and not anytime soon. Even according to Ryan Dahl, NodeJS is not going anywhere, anytime soon. It is now ingrained in the current web development landscape, and has the support of many of the big players in the industry to make sure it can be supported going into the future. But I think a lot of interesting projects will come out of experimentation with how best to maximize the strong points, like security, that Deno touts over NodeJS.

--

--

Dominic Aidoo
Geek Culture

Web Developer by day, Programmer by night. What's the difference really?