In this article you will learn about what is Deno? And how it is different from node.js. Lets first understand both of them.

 

What is Node.js?

Node.js is a open-source javascript runtime environment built on Chrome’s V8 javascript engine.

 

It is built with :

C,

C++

javascript.

 

What is Deno?

A secure runtime for javascript and TypeScript built with V8, Rust, and Tokio.

 

It is built with :

TypeScript Deno supports both JavaScript and TypeScript out of the box.

Rust Deno’s core was written in Rust, Node’s in C++.

Tokio The event loop written in Rust.

 

So start with history of node.js.

 

History of Node.js :

Node.js was written initially by Ryan Dahl in 2009.

Npm was introduce in 2010. Npm is node package manager that whats node.js very power-full.

Adoption rate of node.js sky rocketed. There are lots of website that user node.js and they have Billion of monthly users like twitter and aliexpress.

In 2019, Node.js is one of the most popular server-side framework to use.

 

Now lets discuss history of deno.

 

History of Deno :

Deno is written by creator of node.js Ryan Dahl.

First commit was made in May 13, 2018.

Still in experimental stage.

+30k Stars on Github (in just 1 year).

 

Know lets see what feature’s Deno offers:

 

1. Security :

The most important feature that Deno’s offer is security. Deno by default executes the code in a sandbox, which means that there is no run time access to :

File system

Network

Environmental variables

 

2. Module :

Deno load modules by URLs. By using URLs Deno packages can be distributed without a centralize registry no more package.json or node_module.

Mistakes in Node.js :

You have access to all sort of system call.

Package.json made Node.js depend on npm.

Promises are necessary abstration for async/await.