DEV Community

Cover image for Deno - why all the buzz?

Deno - why all the buzz?

Arek Nawo on May 14, 2020

If you follow the world of Web Development, you might have been recently hearing a lot about Deno - a new JavaScript runtime that might as well...
Collapse
 
monfernape profile image
Usman Khalil

The is the most unbiased and well written review of the hype around Deno. Kudos

Collapse
 
areknawo profile image
Arek Nawo

Thanks! I really think that all the hype is a bit exaggerated. Sure, Deno is really interesting, but to call it Node.js replacement right now is a gross overstatement.

Collapse
 
madza profile image
Madza

reminds me of wasm and vue hype

Thread Thread
 
areknawo profile image
Arek Nawo

Somewhat true. Vue is, after all, just another UI framework (BTW, check mine if you're interested 😅), but WASM, IMHO, is something more. Sure, it's not a JavaScript replacement as some might thought it to be, but it allows developers to bring some really immersive experiences to the Web platform. The hype was, again overexaggerated, but only because WASM serves a very specific and small (even smaller back then) niche of resource-heavy web apps like games or heavy productivity apps, which are rather in the minority on the Web.

Thread Thread
 
madza profile image
Madza • Edited

WASM serves a very specific and small (even smaller back then) niche of resource-heavy web apps like games or heavy productivity apps, which are rather in the minority on the Web

I fully agree on that. Tho, what I meant was, when it first came out (around '17 or '18), the hype level was like: it's an absolute necessity to use it for a calculator app, just to show all the 'cool kids' on the block you are familiar with it too, hahah :)

Collapse
 
webcu profile image
Jorge A. Glez. Mena

Nice article @areknawo !
I'm wondering why having the downloaded modules stored out-of-sight, somewhere on your machine is better than having the node_modules folder? To me seems like one is visible and the other an invisible black-hole-like :)
The link to Tokio is not working.
Your article sparked my curiosity. My next POC will be built in Deno! I find very funny the why of the name of this new runtime.
Thanks!

Collapse
 
areknawo profile image
Arek Nawo

Thanks!
I've already fixed the link to Tokio.
As for external modules, Deno has a single directory on your disk to serve as a cache for all the URL-referenced dependencies. In this way, you only download them once per the specified version. This results in a single dependency of the given version being accessible right from the cache across multiple Deno projects. Also, more optimizations can be applied to the cache's structure, while keeping it away from the user.

So, to summarize the advantages of this approach:

  • no duplicate dependency downloads - even across multiple projects
  • greater potential for structural optimizations of the cache
  • no need to see the node_modules black hole ever again ;)
Collapse
 
simonhaisz profile image
simonhaisz

Yarn already caches download packages globally. But because of how node works these are duplicated in all of the projects that use them.

Thread Thread
 
areknawo profile image
Arek Nawo

True, but this duplication is where the real difference is.

Collapse
 
webcu profile image
Jorge A. Glez. Mena • Edited

I tried to solve that problem in my projects using docker with a shared mount volume. It worked, but only when the dependencies of the projects where the same, and usually they aren't, then I needed to reinstall all the dependencies when switching from one project to another. No the best developer experience :)

When using Yarn after have downloaded the packages the first time the reinstallation was really fast because of the global cache that Yarn creates as @simonhaisz mentioned.

This world of dependencies management is really big :)
Thanks for the response!

Collapse
 
corentinbettiol profile image
Corentin Bettiol

Very nice review, thanks :)

Collapse
 
shegosthato profile image
ShegosThato

I wonder if it's mandatory to use TypeScript

Collapse
 
areknawo profile image
Arek Nawo

No. It's highly recommended but not necessary.

Collapse
 
ematipico profile image
Emanuele Stoppa • Edited

One suggestion: the link to the standard library is not correct because it contains third party modules.

This one is the official homepage of the deno standard library: deno.land/std

Collapse
 
areknawo profile image
Arek Nawo

Fixed! I need to be more cautious with all these links next time. ;)

Collapse
 
shair profile image
Shair

Can't wait deno available at react native lol.