With the emergence of new tech, framework, programming language, and patterns every day the web industry is more confusing than ever, making it very hard for a newbie get their feet wet and get the taste of how it feels to get going or start development in the web dev industry. Every time a new tech is introduced everyone goes on to throwing benchmark results on how the new stuff is better than the old one and how it can replace a huge chunk and make the development better.
I as a developer often get overwhelmed and fatigued by this continuous punch of information and knowledge thrown at my face. We, instead of diving deep in the use cases of a particular tech start comparing it with all the other tech that is around it. Deno is one of the same "runtime" that falls into the category.
- No native support for promises.
- Lack of security.
- A poorly designed module system.
A lot of learning has been taken from NodeJS since Node is out in the wild for almost 11 years. Some of the great features of Deno that tackles the problem that Node has are:
- It has no default access to the file system, your environment variables, and your network so better security. Everything is turned off by default and is not granted access until you specifically provide the access.
- Inspired by GoLang(Another great systems language turned server-side tech) it uses a URL path to resolve the modules. So instead of a module being hosted on a registry on a single platform, the dev can host the dependency anywhere they like and can import them using the URL just like we do in browsers. There is no central repository for it and since Deno always caches the dependency it provides an extra layer of robustness in case the platform hosting the dependency is down. Deno uses typescript as the default language.
- Typescript has been a boon for JS devs out there. It allows a dev to write bug-free type-safe code by restricting the developer to follow certain rules and guidelines so they can be sure that the code they ship is going to work all time.
- The underlying implementation is written in Rust(the equivalent of C++ for Node) and the event loop is Tokio(Rust). Since the development in the Rust community is far active than ever before and as the language claims that it helps developers write memory-safe code without letting them worry much about the memory manager management and thread-safety issues like that in C++, it holds a lot of promises for Deno. Deno's first version was released on 13th May 2020 and the repo has already gained 55k+ stars on Github and a lot of love and support from the community. But Deno is not here to dethrone NodeJS. Node has already been adopted by a large number of organizations and has set its root deep in the web dev industry it would be very very hard for Deno to dethrone Node. If used with caution Node is a powerful runtime that enables a developer to do any task that its counterparts do and it is performant too.
The open-source community has opened a great realm of competition that has made the coexistence of a great variety of tech solving a variety of problem possible in different ways. It is up to you to decide what path you want to take. Since every community is trying to get better than the other it keeps them on toes to make the product even better which always enhances the product. Hence it is a win-win situation for us developers.
All you need to do is instead of going blindly behind a tech decide that does it solve the problem that you want to solve in an efficient way and will it be feasible to put out the cost of learning and implementing the tech as a use case in your scenario possible.
In conclusion, I would like to say that do not get overwhelmed by the knowledge coming at you. Change is constant and all you need to do is adapt according to the situation.
Yearn, Learn, and Earn.
I would highly encourage you to take a look at the references that I have referred to make this article possible.
- Denos official website
- Interview of Ryan Dahl
- Denos official repository
- A great article on Deno on LogRocket