Introduction

Learn about Deno and its prerequisites, and get an overview of what will be covered in this course.

We'll cover the following

Prerequisites

Deno is a secure runtime for JavaScript and TypeScript. This course requires that you have worked with JavaScript or TypeScript and have at least heard of Node.js. Deno will feel like it has the right amount of novelty for us, and at the same time, has some things that will sound familiar to someone working in the ecosystem.

Press + to interact

Overview

Before getting our hands dirty, we’ll learn how Deno was created and its motivations. Doing that will help us learn and understand it better.

We’ll focus on practical examples throughout this course. We’ll write code and then rationalize and explain the underlying decisions we’ve made. If you have a background in Node.js, some concepts might sound familiar. We’ll also explain Deno and compare it with its ancestor, Node.js.

Once the fundamentals are in place, we’ll dive into Deno and explore its runtime features by building small utilities and real-world applications.

Without Node.js, there would be no Deno. To understand the latter well, we can’t ignore its ancestor, which is what we’ll look at in this chapter. We’ll explain the reasons for its creation back in 2009 and the pain points that were detected after a decade of usage.

After that, we’ll present Deno and the fundamental differences and challenges it proposes to solve. We’ll have a look at its architecture, some principles and influences of the runtime, and the use cases where it shines.

After understanding how Deno came to life, we’ll explore its ecosystem, standard library, and some use cases where Deno is instrumental.

Once you’ve read this chapter, you’ll be aware of what Deno is and what it is not, why it isn’t the next version of Node.js, and what to think about when considering Deno for your next project.

Let’s get started!

A little history

Deno’s first stable version, v1.0.0, was launched on May 13, 2020.

The first time Ryan Dahl—Node.js creator—mentioned Deno, it was in his famous talk 10 Things I regret About Node.js. Apart from the fact that it presents the first very alpha version of Deno, it’s a talk worth watching as a lesson on how software ages. It’s an excellent reflection on how decisions evolve, even when they’re made by some of the smartest people in the open-source community, and how they can end up in a different place than what they initially planned for.

After its launch in May 2020 and due to its historical background, its core team, and the fact that it appeals to the JavaScript community, Deno has been getting lots of attention.

This enthusiasm positively impacts its runtime, with many people wanting to contribute and use it. The community is growing due to its Discord channel and the number of pull requests on Deno’s repositories. It’s currently evolving at the speed of one minor version per month, with many bug fixes and improvements being shipped. The roadmap shows a vision for a future that is no less exciting than the present. With a well-defined path and principles, Deno has everything it takes to become more significant by the day.

Let’s rewind a little and go back to 2009 and the creation of Node.js.

At the time, Ryan started by questioning how most backend languages and frameworks dealt with I/O (input/output). Most tools looked at I/O as a synchronous operation, blocking the process until it was done and then continuing to execute the code.

Fundamentally, it was this synchronous blocking operation that Ryan questioned.