Introduction to deno
What is deno?
- Supports Typescript by default. No need of compilation for typescript code.
Transition from JS->TS->Rust.
- It is single executable file.
- We can link to modules using URLs but we don't need to be connected every
time because it cache all.
- Its secure by default.
- Runs on sandbox.
- Uses v8 engine.Same as google chrome.
- Built in using rust programming language.
- Have standard modules developed and reviewed by the same team who developed Deno.
- No need of node package manager (NPM).
- Uses ES6 modules for import export.
- Uses Top Level Async.
- Deno is created by the same person who created node.
released in 2009. At that time there was not Promises/Async/Await, Es modules,
Typed Arrays etc. Since there are so many problems in node,python, Ruby such as poorly designed
module system, security issue, legacy APIs etc and these issues can be solved
then why not Deno?.
Node vs Deno: Why deno is better then node?
One thing that both node and deno has in common is the creator Ryan Dahl.
Why would same person create two differnet things for the same
purpose? The answer is, since the node was released in 2009 many
things has been changed and lots of thing can be made better with deno.
- Deno supports typescript out of the box. while node will need
compilation of typescript code.
- Deno is made using rust programming language while node is made
- Deno Supports top level Async.
- Deno don't need NPM to handle packages.
- Deno imports modules through url and cache it.
- Deno uses promises while node doesn't.
- Deno is secure by default.We can't access system calls, reading, writing etc
without applying specific flag.
- We don't need package.json file in Deno to handle all the
dependencies and other iniformations while node needs pacakge.json file.
Will deno replace node?
Although Deno is better than node in every aspect but node is a well
as well as work fine for backend development. So Peoples will not
switch easily into deno from node but it is certain that deno will
replace node within 4-5 years.