DEV Community

Cover image for What Is Deno and Why Is Everyone Talking About It?
Jeremy Morgan for Pluralsight

Posted on • Originally published at jeremymorgan.com

What Is Deno and Why Is Everyone Talking About It?

Deno is a hot new runtime that may replace Node.js. Everyone's talking about it like it's the next big thing. It likely is. Here's why.

What Is Deno?

What is Deno

From the manual:

Deno is a JavaScript/TypeScript runtime with secure defaults and a great developer experience.

It's built on V8, Rust, and Tokio.

Deno is designed to be a replacement for our beloved Node.js, and it's led by Ryan Dahl, who started the Node.js project way back in 2009. The design stems from 10 things he regrets about Node.js.

So Deno aims to take on Node.js, which would be quite the moon shot if Ryan didn't lead it. So here's a couple of reasons to pay attention to Deno:

  • It's created by the person who started Node.js
  • It directly addresses shortcomings in Node.js

So it's off to a good start. But let's look at some of the technologies behind it and see if that matters.

What Powers Deno

What is Deno

So in the manual, it mentions V8, Rust, and Tokio. Not helpful if you don't know what those are.

V8 is Google's high-performance JavaScript (and now WebAssembly) engine. Node.js and Chrome use it now. It runs standalone, and it's rocket fast. The development on this engine has been very successful the last few years. Note: V8 compiles JavaScript into native machine code for ultra-fast performance. Here is some more great information about V8.

Rust is a systems programming language that's blazing fast. It has no runtime or garbage collector. Its primary focus is on performance and memory safety. Here are some other great things about Rust.

Tokio is asynchronous run-time for Rust. It's an event-driven platform for building fast, reliable, and lightweight network applications. It's also extremely fast and handles concurrency well.

So do you sense a pattern here? Deno is comprised of technologies that are fast, lightweight, and safe. We're off to a great start.

So Why Something New?

What is Deno

Well, JavaScript has changed a bit since 2009. Development, performance, and features have changed drastically in this amount of time, and Node.js has done it's best to keep up. Perhaps starting over fresh is a better approach.

According to Dahl, here are some design issues he's found with Node.js.

  • The module system and its distribution
  • Legacy APIs that must be supported
  • Security issues

Deno aims to address all of these.

If you've worked with Node.js for any amount of time, you know about NPM and its quirks. Personally, I think it's not too bad. It could certainly be improved. It uses a central repository model (npmjs.com), which has had its share of issues.

Deno modules can be hosted anywhere. Also, they're cached locally. You don't need to update them unless you want to. Pretty sweet.

Security in Deno is integrated. It has no access to file or network resources unless explicitly enabled. It dies on uncaught errors.

TypeScript is built-in - This is purely for developers. You can take full advantage of TypeScript for development and use all those fancy explicit types and other goodness from the language.

The Biggest Upside?

What is Deno

Deno promises performance and safety. That's a great benefit, but the most promise lies in the developer experience. It aims to make your life easier. Here's how:

You can use:

  • ES6
  • TypeScript
  • Remote repositories

Cool, those are great. But you can also:

  • Test with Deno - No scrambling to find random tools or argue about what's best, there's a test runner built into the core.
  • Format your Code - You can use "deno fmt" to format your files. This is one of the things I love about Go. Working in an opinionated environment has its downsides. It can also be a big time-saver for developers.
  • Debug - Deno has built-in Debugging so again, you don't have to go scouring the internet for the best debugger.
  • Compile and Bundle - I'm told this is still not complete, but it has a pretty decent bundler, and you can expect more improvements in the future.

These are all developer-focused improvements. While people will likely be raving about the speed and security, it's nice to know it won't be a massive headache for developers to create applications with Deno.

Oh, and it has a single executable to run. This is promising. Anyone who has fought dependencies and breaking changes knows the feeling of having a solid executable to run. You update it when you want, and don't have to fear what's going on with the dependencies at the time.

Final Word

What is Deno

Deno is going to shake things up. It's going to bring:

  • Performance
  • Security
  • Less developer pain

There's a lot of potential here. Deno also promises:

  • Adherence to web standards
  • Protection from deprecated APIs
  • TypeScript included
  • Built-in tooling

The future is bright for Deno, and I can't wait to dig in and build things with it. It looks very promising.

Get started here

Have you built anything with Deno? What do you think? Let me know!

If you want to build up your JavaScript game, check out these awesome courses.

Top comments (18)

Collapse
 
ishan0445 profile image
Ishan Rayeen

I just realised the name Deno is actually made by re arranging Node. Super cool

Collapse
 
elmuerte profile image
Michiel Hendriks

Node actually stands for: No Deno

Collapse
 
ishan0445 profile image
Ishan Rayeen

And Deno actually stands for: Delete Node

Thread Thread
 
venture profile image
venture

Ande Node actually stands for: No Delete Node

Collapse
 
mosharush profile image
Moshe Harush

And the web server oak it's re arranging of koa (node freamwork).

Collapse
 
zzzachzzz profile image
Zach Rosenberger

I just realized that from your comment! This rearranging of the letters is also known as an anagram

Collapse
 
andreybleme profile image
Lucas Bleme • Edited

Well, having a single executable to run would be really nice, but it is not clear yet how this single executable is going to be packaged/generated. Pretty cool!

Has anyone given a try?

Collapse
 
aminnairi profile image
Amin

Yes, I even have made a Docker image to help test Deno without installing it.

In the process, I have discovered that Deno is awesome because a single executable makes the installation pretty easy on most modern systems.

So no need for a ton of shared libraries or to have many interpreters and compilers installed to bake the Deno interpreter.

If you want to give it a try you can use it here (for Docker users): hub.docker.com/r/aminnairi/deno

Collapse
 
v6 profile image
πŸ¦„N BπŸ›‘

Yes.

Collapse
 
andreybleme profile image
Lucas Bleme

Any thoughts on this single executable file generation process? :)

Thread Thread
 
v6 profile image
πŸ¦„N BπŸ›‘

No.

Thread Thread
 
jmojico profile image
Julian Mojico

That's really interesting. You should write a review.

Collapse
 
sergix profile image
Peyton McGinnis

The best thing about deno is the dinosaur. Pretty adorable little guy.

Collapse
 
terkwood profile image
Felix Terkhorn • Edited

Time will tell us what sort of program execution speed and memory efficiency is (hopefully) gained by using Deno. For now, it's worth taking a quick look at some of the benchmarks available on the main site.

deno.land/benchmarks

I haven't gone searching around for any independent benchmarks yet, nor am I motivated enough to write my own πŸ˜‰, but it'll be nice to see how the community talks about Deno's perf in the coming few months. Although I'm a πŸ¦€ heavy rust user πŸ¦€, I don't assume that the new bindings to V8 are a silver bullet.

Thanks for contributing the article!

Collapse
 
avasconcelos114 profile image
Andre Vasconcelos

Thanks for clearing up and sharing why Deno is important!

I wasn't quite getting what all the fuss was about but now I totally understand why I should keep an eye on it :)

Collapse
 
shaijut profile image
Shaiju T • Edited

πŸ˜„ Nice, I have not learned Node.js yet, So were should I start Node.js or Deno ?

Collapse
 
vacom profile image
Vitor Amaral

I like the way you import dependencies but what are the plans to update the versions in the future?

Collapse
 
javinpaul profile image
javinpaul

Deno and Node both are Anagrams :-)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.