Deno 1.0 is launched on 13th May 2020 by Ryan Dahl — the original creator of Node.js
Deno was announced on JSConf EU 2018 by Ryan Dahl in his talk “10 Things I Regret About Node.js”. In his talk, Ryan mentioned his regrets about the initial design decisions with Node.js.
In his JSConf presentation, he explained the regrets while developing Node.js like Not sticking with Promises, Security, The Build System (GYP), package.json and node_modules, etc. But in the same presentation after explaining all the regret, he launched his new work named Deno.🦕 It was in the process of development then.
But on 13th May 2020, around 2 years later yesterday, Deno 1.0 launched by Ryan and the team (Ryan Dahl, Bert Belder, and Bartek Iwańczuk). So let’s talk about some features of Deno.
First, let’s try to find out what the heck is Deno?
Rust Programming language
Tokio — A runtime for writing reliable, asynchronous, and slim applications.
Deno aims to be a productive and scripting environment for the modern programmer. Similar to Node.js, Deno emphasize on event-driven architecture, providing a set of non-blocking core IO utilities, along with their blocking versions.
Deno ships as a single executable with no dependencies. You can install it using the installers below-
curl -fsSL https://deno.land/x/install/install.sh | sh
A basic Hello-World program in Deno looks like the following (same as in Node.js):
We will try to compare the features of Deno with Node throughout the post. And in the end, will try to find out is it really a threat or not?
Node is a decade old now since it was initially launched on May 27, 2009. On the other hand, Deno is relatively very new. Still, not used in the production build much. It could be used to create web servers like Node.js, perform scientific computations, etc.
Highlighted features of Deno 🎆
Secure - No file, network, or environment access by default. 👁🗨
Ships only a single executable file.1⃣
Say No to node_modules and package.json.❌
TypeScript support out of the box. 🤝
The program in Deno is executed in a secure sandbox (by default). Scripts cannot access the hard drive, open network connections, or make any other potentially malicious actions without permission. (E.g) The following runs a basic Deno script without any read/write/network permissions:
deno run index.ts
Explicit flags are required to expose corresponding permission:
deno run --allow-read --allow-net index.ts
2. Single executable file
Deno attempts to provide a standalone tool for quickly scripting complex functionality. Deno is a single file that can define arbitrarily complex behavior without any other tooling. So, every library will be explicitly called and included in the program.
3. Module system
Here, we do not have any package.json or node_modules. Source files can be imported using a relative path, an absolute path or a fully qualified URL of a source file as shown below:
It lags in HTTP server performance.
But indeed for new features, one can definitely try Deno. We will keep an eye on further development of Deno and figure out more in the coming years. So, today we can make a statement that -
As in 2020, Deno is not at all a threat to Node.
Write your suggestions and feedbacks in the comment section below, share it with your friends and colleagues.