What is Deno, then?
Let's start with a short list of features I like about Deno the most:
It possesses a broad standard library
It has TypeScript at its heart, offering a huge advantage in several different ways including first-class TypeScript support (you don't have to compile TypeScript separately, it's done automatically by Deno)
It encompasses modules ES
It does not have a Product Manager
It has a first-class expectation
It features an integrated test facility
It aims to be as browser-compatible as possible, by providing for example a built-in fetch and the global window object
let me take you through the features of Deno!!
Node.js will look like something old after you've used Deno and learned to appreciate its features.
Especially because the Node.js API is callback-based, as promises and async / await have been written long before. There is no change available in Node for that, since such a change would be monumental. And we're stuck with callbacks or promisive calls to an API.
Deno can afford to use new technology to get anything written, because there is no backward compatibility to maintain. Of course, there's no guarantee that the same will happen to Deno in a decade and a new technology will emerge, but that's the truth right now.
Why Deno, then? Now why?
Do wen need to learn Deno?
This is an enormous issue.
It's a big effort to learn something new, like Deno. My suggestion is that if you start with server-side JS now and have no node yet, and have never written any TypeScript, I would start with Node.
Nobody has ever been shot for selecting Node.js (paraphrasing a famous quote).
But if you love TypeScript, don't rely on a gazillion npm packages in your projects and you want to use them wherever you 're looking for, hey Deno might be what you are looking for.
Will it substitute Node.js?
No. No. Node.js is a giant, well-established, amazingly well-supported technology that will survive for decades to come.
TypeScript First Class Support
Deno is written in Rust and TypeScript, two of today's very fast growing languages.
And running TypeScript code with Deno needs no compilation stage-Deno does that for you automatically.
You don't have to write in TypeScript but the fact that Deno 's core is written in TypeScript is massive.
Second, a lot of software knowledge written in TypeScript can be inferred from the tools you use, including Deno.
For example, when we code in VS Code (which of course has a close integration with TypeScript because both are built at MicroSoft), we can get advantages such as type checking while we write our code, and advanced IntelliSense features. In other words the writer will be of great help to us.
Similarities and differences with Node.js
Since Deno is essentially a substitute for Node.js, direct comparison of the two is useful.
These are both developed using the V8 Chromium Engine
Node has an official manager of package called npm. Deno does not, and allows you to import any ES Module from URLs instead.
Node makes use of the CommonJS syntax to import pacakges. Deno uses the official form, the ES modules.
Deno uses modern ECMAScript features in its API and standard library, while Node.js uses a standard library based on callbacks, and has no plans to update it.
Deno offers by permission a security layer for the sandbox. A software may only access the user's executable-set permissions as flags. A Node.js program has access to whatever the user can access.
Deno has long considered the idea of compiling a program into an executable that you can run without external dependencies, such as Go, but it's not yet a thing. That would change the game.
No package manager:
There are pros and cons of having no package manager and having to rely on URLs for hosting and importing packets. I really like the pros: it's very flexible, and without publishing it on a repository like npm we can create packages.
I think some sort of package manager is going to emerge but there's nothing formal yet out there.
The Deno website offers 3rd party packages with application hosting (and thus delivery via URLs): https:/deno.land/x/
All clear let's install Deno !!