Home

3 minute read

What is Deno and should you learn it

Tony Lea

What is Deno and should you learn it

Node is pretty amazing, but there is a new contender stepping into the ring, and his name is Deno.

What is Deno?

Deno is a new server side javascript language created by the same creator of NodeJS, and it's said to have many advantages over Node. In fact Deno is an anagram for Node (a name formed by rearranging letters of another).

Version 1.0 of Deno was released about a month ago. You can check out the official website at https://deno.land/

Why was it created?

Deno was created by Ryan Dahl, who has previous creator of Node. About 2 years ago Ryan wrote a post title 10 Things I Regret About Node.js. He talks about some of the security and structural practices that Node adopted and how he wished things could have been built.

Ryan started working on Deno to be the successor of Node (the way he wished it had been built).

So, is it meant to replace Node?

Many people will adopt Deno and start building cool things with it; however, it's going to replace node. There is still a very big and supportive community behind Node. Additionally, the barrier to entry is very simple with Node so new developers will always gravitate towards something that is easier to grasp.

After learning more about Node and server-side languages, a developer may then choose to dig into Deno, or they may choose to stick with Node.

What's cool about Deno

There are many new features that Deno provides; however, here are just a few of the main features.

No Package Manager

Using Node, you're probably very familiar with NPM, which is the package manager that manages your application dependencies.

Well, with Deno there is no package manager. You can simply install packages from a URL like this:

import { serve } from "https://deno.land/[email protected]/http/server.ts";

And when you run your application, the package (or file) will automatically be downloaded and included in your application.

This is a feature that's become very popular with GoLang and is now being adopted by Deno.

This will make managing and building packages easier for everyone.

Extensive Standard Library

Deno has an extensive Standard Library to help you build some very basic functionality without using other 3rd party packages.

Using these standard libraries you can leverage some awesome libraries like the file system, server side requests, and much more. You can checkout the standard library by visiting https://deno.land/std

Security

Deno is secure out of the box, that means you need to grant permissions for certain files to be run. Node applications can be run by anyone who has access to the file, but with Deno you will have to manage permissions using the deno command.

This is great for security, but may confuse some beginners who are new to web development, hence the barrier to entry I spoke about earlier.

With great power, comes great responsibility. Deno is powerful and it's requiring the developers to be more responsible with their permissions.

Typescript support

Typescript, a javascript language with added benefits, is natively supported with Deno. You can choose to use the javascript you know and love or you can choose to use the extended features provided by Typescript.

Promise based

Anything asynchronous in Deno is also promise based. That means you can use await with any type of function like so:

const res = await fetch('https://devdojo.com');

You won't have to deal with asynchronous hell and the headaches it creates.

Should you learn Deno

I think at this stage it's good to know what it is and if you have some extra time you should definitely check it out; however, it's still early in Deno Land.

If you do decide to adopt Deno you'll definitely be an early-adopter.

I think Deno seems really cool and I'll probably be creating more tutorials in the future, so be sure to look out for those. Additionally, be sure to head on over to the official website at https://deno.land to learn more.