I recently wrapped up an article on the most popular Node.js frameworks, in which I mentioned the meteoric rise of the Fresh framework, which is based on Deno. So, I thought I’d take the time to explain what Deno is and also talk about the frameworks developers use to build with Deno. So, let’s start by answering what Deno is.
Deno also supports top-level await, which allows you to use await outside of an async function and includes a built-in test runner and code formatter. The project is actively developing and constantly brings forward features that bridge the gap between Node and Deno.
In late 2022, the Deno team finalized NPM compatibility, which makes it possible for Deno users to take full advantage of Node.js packages.
If you’re new to Deno, you can learn more here:
- <3 Deno
- Examples of the Permeating Principles of the Web
- Exploring Deno Land (Podcast by Changelog with Ryan)
How popular is Deno itself?
If you haven’t been paying attention, Deno is extremely popular. Node.js, which was launched in 2014, has amassed 93,000 stars on GitHub, while Deno, which was launched in 2018, has 88,000 stars as of March 2023. Now, admittedly, a lot of the buzz around Deno is because it is taking on Node.js and the fact that Ryan himself is working on the project.
This becomes increasingly more evident when we look at things like how many frameworks there are for Deno in comparison to Node. Which is what this next segment is going to be all about. Let’s start with a simple table that shows each framework’s popularity on GitHub.
|Fresh||The next-gen web framework.||10k|
|Aleph||The Full-stack Framework in Deno.||5.0k|
|Oak||A middleware framework for handling HTTP with Deno||4.6k|
|Hono||Ultrafast web framework for the Edge||3.6k|
|Ultra||Zero-Legacy Deno/React Suspense SSR Framework||2.9k|
|Lume||Static site generator for Deno||1.2k|
|Alosaur||Deno web framework with many decorators||786|
It comes as no surprise that Fresh is the most popular choice. It is, after all, made by the Deno team and provides the most convenient way to experience Deno for yourself.
There’s also Aleph which has a strong focus on full-stack development utilizing ES Module syntax, and Lume – a static site generator that takes inspiration from Jekyll and 11ty.
Let’s take a look at each framework individually. I’ve included all the relevant links below each description, including the homepage, documentation, and GitHub repo.
The framework’s core features include a routing framework and a templating engine that allows for just-in-time rendering on the server. This means that pages are rendered only when needed, providing maximum interactivity and speed. Additionally, Fresh allows for seamless rendering of some components on the client side, using Preact and JSX for rendering and templating.
Aleph.js is a web framework that provides a simple and flexible way to build server-rendered web applications. One of the key features of Aleph is its zero-config approach, which eliminates the need for a build step during development. This means that modules only need to be compiled once, and changes are instantly updated in the browser using Hot Module Replacement (HMR) and Fast Refresh.
Aleph dependencies are imported using URLs and managed by Deno’s cache system, eliminating the need for a package.json file or node_modules directory.
Other features of Aleph.js include file-system routing, just-in-time server-side rendering (SSR), streaming SSR, built-in Unocss for automatic CSS, support for TypeScript/JSX in Deno out of the box, import maps, middleware support, and custom module loaders like MDX.
Currently, Aleph.js is in beta and not recommended for production use. It supports several popular frameworks, including React, React with MDX, Vue, SolidJS (experimental), and Yew (in Rust), with plans to support additional frameworks like Svelte and Lit in the future.
Oak is a middleware framework for building server-side web applications in Deno, Deno Deploy, and Node.js. It provides a minimalist API for handling HTTP requests and responses, as well as a middleware router for easily adding additional functionality to applications.
One of the key features of Oak is its use of middleware functions, letting you break up the logic of your applications into discreet functions that can be easily managed and tested. Oak includes several built-in middleware functions for common tasks like logging, error handling, and CORS support, as well as a simple API for creating custom middleware functions.
Oak’s minimalist design and focus on simplicity make it an excellent choice for developers who want to build simple web applications quickly and easily. Its integration with Deno’s core libraries and support for async/await syntax make it a powerful and flexible tool for building server-side web applications.
Hono is a fast and lightweight web framework designed specifically for edge computing environments. It supports a variety of platforms, including Cloudflare Workers, Fastly Compute@Edge, Deno, Bun, Vercel, Lagon, and Node.js.
What sets Hono apart is its ultrafast router, which uses advanced techniques like
TrieRouter to provide high-performance routing without the overhead of linear loops. This makes Hono a top choice for developers who require fast response times and low latency.
In addition, Hono offers first-class TypeScript support and built-in middleware for common use cases such as authentication, validation, and caching. It is built on top of the Web Standard API and has zero dependencies, making it an efficient option for edge computing environments.
Overall, Hono is a promising framework for building fast and efficient web applications on Deno and other platforms. Its focus on performance, flexibility, and ease of use make it a great choice for developers who want to build high-performance applications with minimal overhead.
Ultra is a React/Deno framework designed for Suspense Server Side Rendering. It offers a non-prescriptive approach to web-app development, giving you the freedom to use your favorite libraries or write your own, with the goal of simplifying the development process and streamlining your toolchain.
Ultra leverages the latest browser features, such as Import Maps and ESM, enabling you to write ESM and ship ESM. With Ultra, you can utilize service workers to cache your ESM source code and benefit from native import maps from top to bottom.
The framework is less opinionated and supports much of the React ecosystem by custom server/client controls, giving you the flexibility to bring your own routing, styling, data fetching, and head libraries. Ultra also supports TypeScript and JSX if you prefer to use them.
Lume provides a lot of features out of the box, such as code syntax highlighting, SEO support, Windi CSS support, pagination, and component support, relations support, built-in search functionality, and image and SVG support.
Alosaur is a framework for building fast and scalable server-side applications using the Deno runtime. It provides a set of tools and features that make it easy to develop and maintain web applications, including a powerful routing system, middleware support, and built-in dependency injection.
Alosaur emphasizes performance and simplicity with a lightweight and modular architecture that allows you to customize and extend the framework as needed. It also supports a wide range of third-party libraries and tools, making it a great choice for web app projects.
What’s next for Deno?
While Deno has a smaller ecosystem of frameworks compared to Node.js, it is important to note that Deno is a relatively new runtime environment, having been introduced in 2018. As a result, it is still in its early stages of development and is rapidly gaining popularity among developers who are interested in building applications that prioritize security, performance, and ease of use.
The Deno project has a roadmap that outlines some of the upcoming features and improvements. Some of the key areas of focus include:
- Stability – The Deno team wants to ensure the platform is rock solid and bug-free. This includes improving the testing infrastructure and fixing any outstanding issues.
- Performance – Deno already performs well, but there is always room for improvement. The team plans to optimize the runtime and improve the speed of various operations.
- Security – Deno is already designed with security in mind, but the team plans to make it even more secure by implementing features such as a built-in sandboxing system.
- Tooling – The Deno team wants to make it easy for developers to work with Deno by improving the tooling ecosystem. This includes developing better IDE integrations and creating more libraries and modules.
- Compatibility – The team plans to improve compatibility with existing Node.js modules and packages to make it easier for developers to migrate their code to Deno. As we saw at the beginning of the article, there is already a lot of progress in this area.
Overall, the Deno project is focused on continuing to improve the developer experience and make it a more attractive platform for building modern web applications. Given how quickly Deno is gaining popularity, there’s a good chance that Deno will have a shot at dethroning Node.js as more developers begin their new projects using Deno rather than Node.