As far as Javascript runtime environments go, there is Node and not much more. But the creator of Deno, a former Node.js founder, decided to change that. Now, that Deno is released, it’s time to find out if it can prove a worthy competition for Node.js.

The Deno project started back in 2018 when Ryan Dahl, one of the original developers behind Node.js, announced the development of Deno in a talk called “10 Things I Regret About Node.js”. Yes, it says it all. So what’s the deal and why we need an alternative to Node anyway?

What is Deno?

Deno is a safe and stable runtime environment for JavaScript and TypeScript baked on the V8 engine. It’s written in Rust. The creators of Deno had the intention of taking full advantage of all the latest features of the JavaScript language. For example, its API supports the Promise object and uses the ES module as a default module system. They also designed to be self-sufficient — no external dependencies required. Safety is a major design priority in Deno. All-access operations to the disc or online must be explicitly issued in the script.

Deno vs Node.js

Deno creators have every intention to provide a strong alternative to Node.js. Hence, it’s no surprise that even though they have a lot in common, there are a couple of major differences between these two.

Now “Deno” is was basically just an anagram for node. JS and indeed they know as we can see here on their official page download that Deno is a secure runtime for JavaScript and Typescript if we have a look at nodejs.org we see that’s not too far away from what we find their node.JS is a JavaScript runtime built on chrome’s V8 JavaScript engine and indeed there now in the end is a new JavaScript runtime developed by the inventor of node.

Let’s take a look at a simple side-by-side comparison:

DENONODEUses V8Uses V8Written in RUST and TypeScript Written in C++ and JavaScript Run in the sandbox with limited access — explicit command issue in the script required.The question of access is limited to the specific access rights of a user that runs the script.Decentralized modules — loaded from an URL.NPM ES ModuleCommonJs The API and the standard library takes full advantage of ES and Promise.The API and standard library based on callbacks.

#deno #programming #javascript #node #web-development

Is Deno Worthy Competition for Node.js?
2.95 GEEK