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 :
l C,
l C++
l javascript.
What is Deno?
A secure runtime for javascript and TypeScript built with V8, Rust, and Tokio.
It is built with :
l TypeScript— Deno supports both JavaScript and TypeScript out of the box.
l Rust— Deno’s core was written in Rust, Node’s in C++.
l Tokio— The event loop written in Rust.
So start with history of node.js.
History of Node.js :
l Node.js was written initially by Ryan Dahl in 2009.
l Npm was introduce in 2010. Npm is node package manager that whats node.js very power-full.
l 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.
l In 2019, Node.js is one of the most popular server-side framework to use.
Now lets discuss history of deno.
History of Deno :
l Deno is written by creator of node.js Ryan Dahl.
l First commit was made in May 13, 2018.
l Still in experimental stage.
l +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 :
l File system
l Network
l 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 :
l You have access to all sort of system call.
l Package.json made Node.js depend on npm.
l Promises are necessary abstration for async/await.
0 Comments