For those websites that can use it (like a blog), it seems like static site generation would be better, to cache the database requests? Then you can run in the free tier of Netlify or using GitHub pages, for example.
Or to do the opposite, for a single-player website where there aren't any server requests to cache, a client-only website can run offline.
Fresh looks good for multi-player websites that are unavoidably making database requests interactively, though.
I similarly wish Fresh did full server side generation. Even Next.JS has a tool to export as a static site. Maybe it will come to Fresh at some point, or maybe it’s there and just not well documented.
I’m using NanoJSX with Deno to render JSX on the server and spit the result into a file, but I’m having to write a lot of SSG stuff myself, (like logic to loop over files).
Yeah, for their examples there isn’t even a reason to use dynamic rendering instead of static rendering (pre-build a static site), as the response doesn’t change for different requests. Dynamic rendering only pays of if you do something more complex, like authentication, etc.
But I guess static rendering would go against their mantra of “no build step”, which even currently is actually false, as they need to generate the manifest file.
They're probably planning on making another vercel way and tie in future customers to their platform running v8 isolates.
I understand it from a business point of view but it's bad for users and for performance. Same thing happened to images in next. The plugins to have optimized images in next are all broken and the official one use a "free" dynamic route offered by vercel.
Or to do the opposite, for a single-player website where there aren't any server requests to cache, a client-only website can run offline.
Fresh looks good for multi-player websites that are unavoidably making database requests interactively, though.