Fresh – Is this new Javascript framework the Node-killer

The time has come once again to evaluate a new Javascript framework…but wait. This isn’t your run of the mill React clone with slight variations promising to change everything. Fresh is a Deno-based web framework that sends no javascript to the client by default. All of the bulk rendering and computation can operate on the server, and the client only needs to render small islands of UI. For those who don’t know, Deno is a runtime for Javascript built by the original creator of NodeJS as a so

July 1, 2022 2 Min Read
Fresh – Is this new Javascript framework the Node-killer
Fresh – Is this new Javascript framework the Node-killer

Codesphere

From everyone in the Codesphere Team:)

Table of Contents

The time has come once again to evaluate a new Javascript framework…but wait. This isn’t your run of the mill React clone with slight variations promising to change everything.

Fresh is a Deno-based web framework that sends no javascript to the client by default. All of the bulk rendering and computation can operate on the server, and the client only needs to render small islands of UI.

For those who don’t know, Deno is a runtime for Javascript built by the original creator of NodeJS as a solution to a lot of the problems with the original Node. While the ecospace is still quite underdeveloped, Fresh might just be the framework that puts Deno on the map.


Fresh Architecture

The two main parts of a Fresh application are routes and islands.

Routes are the way in which your web app responds to different requests. This can mean serving a response as part of an API, or serving HTML for your front end.

Islands are isolated preact (effectively a more lightweight version of React) components that are rendered on the client side. You can serve these to the client via routes. Fresh automatically handles the updating of Islands to minimize client load times.

You can create new routes and islands by creating files in the /routes and /islands folders respectively.

Since the bulk of processing is done on the server-side, Fresh can load pages considerably faster than most frameworks that use Client-Side rendering and even many Server Side Rendering(Since Fresh doesn’t ship the whole rendering infrastructure to the client)


Demo Application

Want to play around with a demo? First install Deno, and then create a demo project with:

deno run -A -r https://fresh.deno.dev my-project-name

And then run the project with:

deno task start


Our Review

Working with Fresh felt incredibly lightweight and simple compared to most of the new frameworks that we’ve tried for the blog.

The routing/island system is incredibly intuitive and solves a lot of the bloating issues that make web frameworks undesirable. I fully plan to use Fresh for some projects in the future.

Obviously, the biggest challenge when working with Fresh is the size of the Deno ecosystem, but Fresh honestly seems like a big enough step in the right direction to warrant putting up with the growing pains of Deno.

If enough people feel the way we do about it, it might just get enough people into the Deno ecosystem to finally kill Node.

About the Author

Fresh – Is this new Javascript framework the Node-killer

Codesphere

From everyone in the Codesphere Team:)

We are building the next generation of Cloud, combining Infrastructure and IDE in one place, enabling a seamless DevEx and eliminating the need for DevOps specialists.

More Posts

From Dev Chaos to Cloud Clarity: No More “It Works on My Machine”

From Dev Chaos to Cloud Clarity: No More “It Works on My Machine”

Tired of the “It works on my machine” nightmare? This blog explores how Codesphere eliminates environment drift by letting you develop in production-grade cloud workspaces. so your code runs the same everywhere, from dev to deploy. Build smarter, ship with confidence.

From Friction to Flow — How Codesphere Transforms Productivity

From Friction to Flow — How Codesphere Transforms Productivity

Discover how Codesphere transforms software development by unifying coding, CI/CD, deployment, and infrastructure into one seamless platform. Boost developer productivity, reduce DevOps overhead, and go from idea to live without switching tools or breaking flow.

Build a Personal Chatbot with Ollama and Open WebUI

Build a Personal Chatbot with Ollama and Open WebUI

Discover how to run Ollama with Open WebUI using a streamlined Codesphere deployment. This blog walks through the benefits, use cases, and a complete step-by-step setup to launch a private, local LLM environment