What is Deno? How it is different from Node.js?

    Jun 02, 2020       by Pankaj Kumar
deno-vs-nodejs.jpg

In this article, We will try to understand the framework, Deno, with its similarities and differences with Node.js

 

What is Deno?

Deno is a secure TypeScript runtime built on V8, the Google runtime engine for JavaScript. It is built with Rust, Tokio, TypeScript(Deno supports both JavaScript and TypeScript) and V8 (Google’s JavaScript runtime used in Chrome and Node).

Deno was announced almost 2 years ago by the creator of Node.js, Ryan Dahl, at JSConf EU.

 

Features of Deno

Let's try to understand its features

  • It is fully based on JavaScript modern features
  • It has no package manager like Node.js
  • It has a built-in testing facility
  • It embraces ES modules.
  • It has an extensive standard library
  • It has TypeScript at its core, Which makes eligible to make the robust applications. And here we don't need to compile the JavaScript code manually. 
  • It is also tried to make browser-compatible, As it provides built-in fetch and the global window object

 

Similarities and differences with Node.js

Similarities:

  • Both are developed upon the V8 Chromium Engine
  • Both are preferred for developing server-side applications with JavaScript

Differences:

  • Node.js is written in C++ and Javascript whereas Demo is written in Rust with Typescript.
  • In Node.js we have npm, it's official package manager for all the dependencies. Deno does not have anything like this, it directly allow us to import ES module from URLs.
  • Node.js uses common Javascript syntax for importing packages whereas Deno uses ES Modules
  • Node.js uses callback-based standard-library whereas Deno uses modern ECMAScript features.
  • Deno provides extra layer of security than Node.js

 


WHAT'S NEW

Find other similar Articles here: