The man behind the soar.
Ryan Dahl is the original creator of Node.js , and Deno is his solution to everything that he felt Node.js lacked. The first time he mentioned his solution, Deno was in 2018, during his talk “What i regret about Deno”. Rome was not built in a day and neither was Deno. After two years of continuous work, his project was ready. On May 13,2020 Deno 1.0 was finally released. He wanted to replace Node.js, it had everything Node.js lacked, Deno promised high security, patching to bugs Node.js did not address and an overall better experience.
He can handle the issues, but this can lead to so much more. In a simple and wide ranged environment Deno can do all that Node can do and better. Simplicity is the key but can it really deliver?
Ive mentioned it a couple of times now , but have not gone int detail.What is Deno?
- Secure by default. No file, network, or environment access, unless explicitly enabled.
- Supports TypeScript out of the box.
- Ships only a single executable file.
- Has built-in utilities like a dependency inspector (
deno info) and a code formatter (
- Has a set of reviewed (audited) standard modules that are guaranteed to work with Deno: deno.land/std
Deno does not allow access on the whim. It keeps you from risks with is stricter permission requests and granting. To gain access to its filesystem, environment variables or network you would have to use command-line arguments to enable this access.
If you want to get access to the ‘xyz’ folder, use the command-
deno — allow-read=/xyz myscript.ts
This command only allows you to read. In order to write you would have to use a completely different command and gain permission.Its like installing a new app, it may asks for permission to access your location, contacts, photos. The same notion applies.
Maintaining a stable API, any feature and module not ready for stabilization is hidden behind an unstable command line flag. You can still use these unstable API’s during runtime but it also means that they have no undergone a security check and are not ready.
Deno claims to have a complete library. Allowing developers to perform basic tasks and taking on complex ones with external libraries.
Deno ships as a single executable with no dependencies. You can install it using the installers below, or download a release binary from the releases page.
Shell (Mac, Linux):
$curl -fsSL https://deno.land/x/install/install.sh | sh
$iwr https://deno.land/x/install/install.ps1 -useb | iex
$brew install deno
$choco install deno
$scoop install deno
Build and install from source using Cargo:
$cargo install deno --locked
See deno_install for more installation options.
Deno vs Node.js
All platforms have their own purpose. However Deno and Node’s purpose are the same, yet the mechanisms behind them differ. You could even refer to Deno as the extended version of Node.Both are event driven and have asynchronous tools . Te major difference lie in the following
- Cores: Node’s was written in C++, while Deno’s written in Rust.
- Unlike Node, Deno uses URLs or file paths to load third-party modules and external dependencies instead of
- While Node uses CommonJS as the default module system, Deno uses ES modules.
- There is no registry or
package.jsonin Deno. Modules can be hosted everywhere on the internet.
- Deno needs explicit permissions to get access to files, networks, and environment variables, which means better security.
- Differing from Node, Deno executes the code by-default in a sandbox which means it has no access to the file system, network, environment variables.
Is Deno soaring past Node.js?
Honestly nobody knows.As of this moment the answer is clearly No. Deno can not replace Node, not yet.Deno id more than simply a modified version of Node.js , it its own platform a completely different implementation. But it is definitely beginning to compete.
The excitement behind it like with every new innovation is high.It is still new and still growing, its first version was released publicly just over a year ago.It has unique feature and potential. The future welcome Deno with open arms, a fun , better and more stable environment is not something developers would shy away from. Who knows, Deno might just soar to new heights.