Yayyy!! Mindbrews First Edition is now live on Magzter!

Developers & Open Source

Deno: The Replacement for Node.js ?

A decade after Node.js was first announced, JavaScript and the Web Development have evolved, and has changed the way JS applications are developed. “Deno” is a new JavaScript/TypeScript runtime that was designed with all those new capabilities in mind.

What is Deno ?

Deno is a simple modern secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust.

Deno was introduced to the world of technology by Ryan Dahl, the creator of Node.JS, in the year 2018. He recently released the first stable version of Deno as an evolution of the good-old NodeJS.

In Node’s defense, it is a comprehensive server-side JavaScript runtime in its own right. That is mostly due to its vast ecosystem and the broad community that supports it. But, however, Dahl admits there are a few things that he should have thought about more. These include security, modules, and dependencies, to name a few.

Suggested:  Superpower your Static HTML with Static Jinja!
Ryan Dahl on NodeJS and its flaws.

Also, to be honest, none could’ve envisioned how much the platform would grow in such a short period of time. Back in 2009, JavaScript was still this weird little language. There was much lesser community support and everyone made fun of it. It also lacked the many features that it boasts of today.

Top Features of Deno

deno hashtag on Twitter

Security Features

Among the most important of Deno’s features is its focus on security.

As opposed to Node, Deno by default executes the code in a sandbox, which means that runtime has no access to:

  • File Systems
  • Networks
  • Scripts
  • Environment Variables

Deno executes by default, the code in a sandbox, so it has no access by default to the file system or the environment unless you explicitly enable this. Instead, you can use command-line arguments (CLI), to enable or disable different security features.

Suggested:  India, Japan enters cyber-security deal on 5G

Additional TypeScript Support

Deno is written in TypeScript, and you can directly use TypeScript in your code without any trans-piling step from your side. This was not the case in NodeJS, where TypeScript has always been segregated from implementation with JS. Additionally, in Deno, we can choose to write in plain JavaScript as we want.

Browser Support

We don’t require build tools like WebPack, to make our application ready to use in a browser, as is required while deploying the NodeJS applications. This is all possible, thanks to the native support of the ES modules in Deno.

When a website crashes….

Deno caches the downloaded modules. Since the cache is stored on our local disk, the creators of Deno recommend checking it in our version control system (like Git) and keeping it in the repository. This way, even when the website goes down, all the developers can retain access to the downloaded version and the website is good to go again.

Suggested:  FACEBOOK planning a new blockchain-based service?

Conclusion

Deno is an interesting project that has been steadily growing for quite some time now. But it still has a long way to go. That is especially before it’s considered production-ready and stable enough.

Another thing that it lacks right now is community.

As is considered, “Community is Key ” in making anything successful.

With its decentralized approach, it takes the necessary step of freeing the JavaScript ecosystem from the centralized package registry that is npm. Node.js is still a giant, well supported, and well established. But in the future, Deno could be a great alternative.

Raghav Khullar
About author

Student | Melophile | Writer | Programmer | History Fanatic
Related posts
GlobalLatestPoliticsTechnology

India, Japan enters cyber-security deal on 5G

GlobalLatestNewsTechnologyWomen

Nobel in Chemistry: Pioneers in Gene Editing shatter history

HistoryLatestNewsPolitics

What's happening to Andhra Pradesh temples?

LatestNewsPolitics

What is Population Control Law and why is it trending on twitter?