Live data from Hacker News

Fresh – Next-gen web framework

fresh.deno.dev

101–110 of 463 posts

Re: Fresh – Next-gen web framework

#101

Ryan Dahl talks a bit about it in this talk at Remix Conf 2022: https://www.youtube.com/watch?v=4_nxvVTNY9s&t=10781s He describes it as a post-Unix web framework (i.e. built on serverless primitives like cloudflare workers/deno deploy) with the goal of <10s deployment (which he says requires JIT compilation on first-request)

So my reading of that is that Fresh as it stands now is more of a demo and challenge to the Remix community to step up.

Re: Fresh – Next-gen web framework

#102

Ooh, some competition for Next.js? Vercel is doing a really good job with Next, but it's good to see some competition. Of course, that means there's now 65,535 + 1 more way of serving a web page using Javascript (sigh). Rehydration is a really big deal. Sounds dorky but it dramatically speeds up load times and such by serving flat HTML and injecting JS afterward, like the old days, except you can write code like it's…

> that means there's now 65,535 + 1 more way of serving a web page using Javascript (sigh).

You only need one (or none). I personally recommend Next.js for just about anything.

Re: Fresh – Next-gen web framework

#104

I love that the pendulum is swinging back to file-based routing. It reminds me a lot of the simplicity of cgi and php scripts. I'm sure there's a point where it explodes into a monster of complexity with enormous sites, but for everything smaller it's so much simpler and easier.

Next (no pun intended) thing we will rediscover is using templating engines (only in JS or so), because we realize, that mixing state and behavior is a problem. Then we will have gone full circle, but probably with some unreasonable overhead as a result. Maybe the whole thing of rendering templates will somehow become a part of webpack and everyone will have to configure webpack.

Good that classic web frameworks are still around and healthy, which have been rendering templates on the server side for a decade or so.

Re: Fresh – Next-gen web framework

#105

Fresh = Deno version of Astro (static-first with SSR) and Isle (vue-focused) and bigger Next.js/Nuxt SSR (with no client js) modes. Remix also does well here with a focus on only SSR. It's basically what the original "isomorphic" javascript promise was to have the same code seamlessly running on server and client with a flexible split on what part ran where, now possible down to an individual tag/component. Also wort…

Does that mean JS running server-side? That's a full-stop dealbreaker for me.

Could you elaborate why? I’m finding the concept appealing, but would like to learn more about the tradeoffs.

Re: Fresh – Next-gen web framework

#106
post #99

Does Remix also not only ship JS for the interactive bits? I.e, you send over some HTML & then hydrate it with Javascript, right?

If so, how does it play out in practice? Do people really make most things in a way that does not require hydration, or do they make simple text and forms a hydrated thing, that does not work without JS?

Re: Fresh – Next-gen web framework

#107

Fresh = Deno version of Astro (static-first with SSR) and Isle (vue-focused) and bigger Next.js/Nuxt SSR (with no client js) modes. Remix also does well here with a focus on only SSR. It's basically what the original "isomorphic" javascript promise was to have the same code seamlessly running on server and client with a flexible split on what part ran where, now possible down to an individual tag/component. Also wort…

> Deno version of Astro (static-first with SSR) and Isle (vue-focused) and bigger Next.js/Nuxt SSR (with no client js) modes. I think you have just summoned Cthulhu.

yeah, i was starting to feel queezy...

Re: Fresh – Next-gen web framework

#108

Why this can be great: - The dev experience is closer to the early days of PHP. - TypeScript, Preact out of the box. No need to configure build tools / deploys much faster. It's a pain in the ass to make these working at the same time and targeting both browser and server nowadays. - You can have interactivity without bolt-on client-side scripts that are different from other parts. - The code could be running on the…

Yep. We have come full circle. This is php with a better experience

Re: Fresh – Next-gen web framework

#109

Fresh = Deno version of Astro (static-first with SSR) and Isle (vue-focused) and bigger Next.js/Nuxt SSR (with no client js) modes. Remix also does well here with a focus on only SSR. It's basically what the original "isomorphic" javascript promise was to have the same code seamlessly running on server and client with a flexible split on what part ran where, now possible down to an individual tag/component. Also wort…

[deleted]

Re: Fresh – Next-gen web framework

#110

Ooh, some competition for Next.js? Vercel is doing a really good job with Next, but it's good to see some competition. Of course, that means there's now 65,535 + 1 more way of serving a web page using Javascript (sigh). Rehydration is a really big deal. Sounds dorky but it dramatically speeds up load times and such by serving flat HTML and injecting JS afterward, like the old days, except you can write code like it's…

> that means there's now 65,535 + 1 more way of serving a web page using Javascript (sigh). You only need one (or none). I personally recommend Next.js for just about anything.

Next is lovely to work with but it has a flaw. It loses client state between pages if you use getServerSideProps. For any app that needs to load some up to date data on every page if the user is hitting it for the first time, but doesn't need to load it if the client already has it, Next doesn't have a solution. You end up using a persist gateway pattern which is a massive amount of work that you shouldn't really need the client to do.

The problem is that that's pretty much every web app. Every time I've used Next I've end up abandoning SSR and building a plain clientside rendered app.

Post reply on HN