Deno Frameworks: Building Faster, More Secure Applications

The Most Popular Deno Frameworks in 2023

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 is a runtime for JavaScript and TypeScript that was created by Ryan Dahl, the creator of Node.js. It aims to address some of the design flaws and limitations of Node.js. It is built on V8, the same JavaScript engine that powers Google Chrome, and it provides a secure runtime environment with built-in features like TypeScript support, a secure permissions model, and a module system that doesn’t rely on a centralized package repository like NPM.

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:

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.

FreshThe next-gen web framework.10k
AlephThe Full-stack Framework in Deno.5.0k
OakA middleware framework for handling HTTP with Deno4.6k
HonoUltrafast web framework for the Edge3.6k
UltraZero-Legacy Deno/React Suspense SSR Framework2.9k
LumeStatic site generator for Deno1.2k
AlosaurDeno web framework with many decorators786
If you know of any other upcoming Deno frameworks – let me know so that I can include them in this list.

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.

1. Fresh

Fresh is a full stack modern web framework for JavaScript and TypeScript developers, designed to make it trivial to create high-quality, performant, and personalized web applications.

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.

One of the most significant advantages of Fresh is that it does not require any build step. The code you write is the code that is run on the server and the client, and any necessary transpilation of TypeScript or JSX to plain JavaScript is done on the fly. This allows for very fast iteration loops and deployments.

The key differentiator of Fresh is that it runs everything just-in-time, without requiring any building, packing, bundling, or transpiling. This not only saves time but also removes complexity, as you can see exactly what you get. This results in a significantly smaller code footprint, with only 0-3kb shipped to users visiting your site (plus any client side JS you choose to ship), instead of prebundled, transpiled, polyfilled, prebuilt 10mb JavaScript.

2. Aleph

Aleph is modern framework that doesn't need webpack or other bundler since it uses the ES Module syntax during development. Every module only needs to be compiled once, when a module changes, Aleph just needs to re-compile that single module.

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.

3. oak

oak is a middleware framework for Deno's native HTTP server, Deno Deploy and Node.js 16.5 and later. It also includes a middleware router. This middleware framework is inspired by Koa and middleware router inspired by @koa/router.

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.

4. Hono

Hono - [炎] means flame🔥 in Japanese - is a small, simple, and ultrafast web framework for the Edge. It works on Cloudflare Workers, Fastly Compute@Edge, Deno, Bun, Vercel, Lagon, Node.js, and others. Fast, but not only fast.

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 RegExpRouter and 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.

5. Ultra

Ultra is an all ESM React/Deno framework that is built for Suspense Server Side Rendering. Ultra takes a non-prescriptive approach to web-app development. You can configure it to use most existing libraries that you are accustomed to — or you can write your own.

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.

6. Lume

Lume is a static site generator for Deno, inspired by Jekyll and Eleventy but faster, simpler, and easier to use. With support for multiple file formats, including Markdown, YAML, TypeScript, JSX, and Nunjucks, Lume is super flexible and easy to extend.

Lume is a static site generator based on the Deno runtime environment that supports multiple languages such as Markdown, Nunjucks, TypeScript, and JavaScript. With Lume’s smart plugins that enable searching and paginating content, generating pages from data in Lume is easy and straightforward.

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.

Although Lume is a new static site generator compared to others, it offers a lot of configuration options, and you can do practically anything with it. With Lume processors and preprocessors, you can easily manipulate the HTML code with the JavaScript DOM API.

7. Alosaur

Alosaur is a scalable framework for building applications on Deno that offers out-of-the-box entities for developing both big and small applications. With an overall structure inspired by .NET Core and Ktor, Alosaur utilizes Dependency Injection entirely from tsyringe. As a result, Alosaur is well-suited for developers who prefer a familiar, structured approach to building applications on Deno.

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.

Previous Post
The Most Popular Node.js Frameworks

The Most Popular Node.js Frameworks in 2023

Next Post
Child Stylesheet Loading Twice

How to Fix: Child Stylesheet Loading Twice (WordPress)

Related Posts