Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Intro To Deno ! A Node Js killer?

The world of JavaScript changes a lot from from the past when Js is only used for client side and library like jQuery is used to make web animation and other stuff but when Node(a run-time environment that let you write server-side application with JavaScript) comes it is a breeze for JavaScript developer to become a full-stack developer and to create a non-blocking,secure and highly scalable app or API.

And all of this possible because of Ryan Dahl , who now gave us a new run-time environment called Deno (v1 got released on 13–05–2020), so let’s discuss what’s are common with node and what are differences.

Deno is also a JavaScript run-time environment which is based of chrome V8 engine (similar to Nodejs) but unlike Node which is written in C++, Deno is written in Rust which make it a safer interface.

Deno Support of Microsoft TypeScript, if you like a statically type language and need a loose version of it in Js then TypeScript is for you, Unlike Node deno support Typescript on the fly.

No Need to install npm package Deno supports a single executable file which make it more secure and you can import package without installing it.

Here is an example:

Here a complete HTTP server module is added as a dependency in a single line. There are no additional configuration files, there is no install to do beforehand, just deno run test.js

Also like browsers, code is executed in a secure sandbox by default. Scripts cannot access the hard drive, open network connections, or make any other potentially malicious actions without permission. The browser provides APIs for accessing cameras and microphones, but users must first give permission. Deno provides analogous behaviour in the terminal. The above example will fail unless the --allow-net command-line flag is provided.

Deno has a built-in utilities like a dependency inspector (deno info) and a code formatter (deno fmt).Also Deno can take http request upto 25k per second(Node has 34K).

So if you are thinking that Deno going to replace Node js then the answer is No not in near future, Deno is still young while Node js is a time proven robust environment which has a larger community also it has many framework like express, koa etc make it most beloved so Node still has a long way to go but Deno promise more thing in future that we should look forward.

Add a comment

Related posts:

The Step by Step Guide Involved in the NDIS Plan Reassessment

It is designed to help people with a disability live independent lives and participate in the community. Under the NDIS, people with a disability are assessed for their needs and provided with a plan…

How to plan the ultimate company retreat.

Although the scale of synchronisation posed some issues from time to time, I had the guilty pleasure of spending (working) hours scanning Airbnb for stunning villas in Southern Europe. In case you’re…

Meeting with Tech Garden Kazakhstan and cooperation agreements

During the visit of the CommTrade team to the city of Almaty, a meeting with Tech Garden was held at the highest level (techgarden.kz). The Tech Garden Innovation Cluster is a professional…