The next-gen Fresh web framework for Deno accelerates page loading

  • Major upgrades for Fresh, a popular TypeScript framework on Deno runtime.
  • How does a new version of Fresh speed up page loading?
Posted:
08.18.2023
Fresh 1.4: Lightning-Fast Web Framework for Deno

On Wednesday, August 16, a modern programming project, Deno, posted in their blog about an important update for Fresh, a popular web framework under the umbrella of Deno technologies. This latest iteration of the full-stack web framework built on the Deno JavaScript/TypeScript runtime, Fresh 1.4, introduces noteworthy enhancements for faster page loads and improved shared layouts.

The main focus in the newest version is “on the overall developer experience of making it easier to use shared layouts, route-specific islands, and more in Fresh”.

In the posted report, the Fresh team emphasizes notable gains in performance enhancement of page loading. They were achieved through pre-compilation, resulting in asset delivery speeds 45 to 60 times faster compared to just-in-time rendering, especially evident during the cold start of a serverless function. The efficiency improvement varies based on the size of the interactive components, or "islands," being delivered.

Regarding layouts, Fresh1.4introduces supportfor_layoutfiles, acting as localized app wrappers for specific routes. These_layoutfiles can be placed in any route folder, and Fresh intelligently detects and stacks matching layouts on top of eachother.

As apart of the broader Deno ecosystem, the Fresh merges a routing framework with a templating engine that dynamically renders pages as needed. Projects can be deployed manually to any platform usingdeno.

Starting a Fresh TypeScript framework project is pretty straightforward; developers can initiate it by running the command deno run -A -r https://fresh.deno.dev. Existing projects can be updated with deno run -A -r https://fresh.deno.dev/update. Additional enhancements in Fresh 1.4 include:

Starting a Fresh Type Script framework project is pretty straight forward; developers can initiate it by running the commanddenorun -A -r https://fresh.deno.dev.Existing projects can be updated withdeno run -A -r https://fresh.deno.dev/update.Additional enhance mentsin Fresh1.4include:

  1. Simplified handling of custom HTML, head, and body tags by directly setting the <html>, <head>, and <body> tags on the server.
  2. Support for async layouts and _layout components.
  3. Quickened function definitions with the new define* helper functions.
  4. Introduction of route groups to facilitate code organization.

Although these updates are significant, both Fresh and Deno are far from their destination in bringing the potential of their projects to maximum capacity. Fresh has already created a roadmap for future upgrades that include a revamp of the plugin system to enhance power and comprehensibility, as well as support for view transitions and SPA-like client navigation. As soon as these improvements will be released, we’ll update you on all innovations. So, subscribe to our newsletter to be informed about all major events and breaking news in the IT industry.

Nataliia Huivan
Nataliia Huivan
Professional author in IT Industry

Author of articles and news for Atlasiko Inc. I do my best to create qualified and useful content to help our website visitors to understand more about software development, modern IT tendencies and practices. Constant innovations in the IT field and communication with top specialists inspire me to seek knowledge and share it with others.

Share your thoughts in the comments below!

Have any ideas or suggestions about the article or website? Feel free to write it.

Any Questions?

Get in touch with us by simply filling up the form to start our fruitful cooperation right now.

Please check your email
Get a Free Estimate