Live data from Hacker News

Fresh – Next-gen web framework

fresh.deno.dev

131–140 of 463 posts

Re: Fresh – Next-gen web framework

#131

I don't fully understand the difference between this (and something like Remix, which seems similar) and other frameworks like Next.js (React) and Nuxt.js (Vue). Can someone explain a bit about the differences, and pros/cons to each?

(I am not affiliated with any of these technologies, but am a Next/Vercel customer. I am also not super familiar with anything except Next, but this is my attempt at an explanation.) I think they all try to solve the same problem: how to get a modern interactive app to run on (and be performant) what is essentially a hacked-together ecosystem, HTML + Javascript, with decades of backward compatibility baggage. The ess…

What happens when the user interacts with the page while it's being rehydrated? Is that click eaten, does the user see some error, or does the page remember the click and run it when it has pulled in the relevant js?

Re: Fresh – Next-gen web framework

#132

Earlier quoted context omitted.

Deno vs Node appears to be one of them.

Sure - this seems to be an implementation detail, though - eg, Remix and Next.js are both on Node.js but seem to have some difference that's not abstracted away, in terms of how you develop, how concerns are separated, etc.

I would say that deno vs node is the biggest difference, with node you need to setup and maintain 3rd party tools (bundlers, transpilers, etc) but with deno all that tooling is first party, so in theory is less things to install and worry about.

Deno has other advantages in paper, like official ts support, all the tooling was written in rust (so it's more performant that the default ones that the others use).

The only downside right now with deno is popularity and maturity of the ecosystem, it is just too new, so you will have hard time finding what you are looking for that works out of the box, while a lot of companies invested in node official packages.

Re: Fresh – Next-gen web framework

#134
I suggest you take a look to Phoenix Live View, it's like that (very little client side JS) with the added benefits of the BEAM. You can serve thousands if not million of simultaneous clients with a small machine.

Re: Fresh – Next-gen web framework

#136

On the part about adding interactivity: > "To include this in a page component, one can just use the component normally. Fresh will take care of automatically mounting the island component on the client with the correct props:" How does a developer know what rendering is going to take place client-side vs server-side, and is there any way to control this? Or is it all fully "magical"

If I understood correctly, it all renders server side and then adds the interactivity where it's necessary, and in a react app is kinda easy to spot which components are interactive or not, the biggest difference here, vs a traditional react framework, is that fresh is more similar to astro[0] than next.js/remix, so it ships less js.

What I read from other comments is that fresh does code splitting, so for example if the interactivity is out of your viewport and you scroll down to that element, it will then load the js required to make it interactive, while I find that idea cool, what worries my is that it could take a few ms to load the js and then other few ms to boot that component and render it interactive. But I don't have experience with any of the frameworks (besides next.js where I build a small demo project to try it out).

[0] https://astro.build

Re: Fresh – Next-gen web framework

#137
Reading some of the more eager comments, I think it needs to be said I don't always my application indexed, so having an actual SPA makes a ton of sense. What good is any of this when your session is in the browser and all you can manage is serve the login page "very fast".

Re: Fresh – Next-gen web framework

#138

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.

Yes that’s part of the point. I’m not sure there is a name for these, I just call it frontend server. You don’t necessarily have to put your whole application there, but can focus on client interactions, and these things are really good at that.

Re: Fresh – Next-gen web framework

#139

is fresh dependent on deno ? can it also be run on vanilla node?

I wouldn't run on node, deno loads the dependencies from a url directly (no need to install that) a convention is to use a `deps.ts`[0] file. Also with node you will need quite a setup to run this project (if it could run), you will need ts-node, webpack or similar, etc, while deno comes with all that tooling included by default.

[0] https://github.com/lucacasonato/fresh/blob/main/src/server/d...

Re: Fresh – Next-gen web framework

#140

Does anyone know what software can be used to design the juicy hero animation seen here?

It's an SVG animation. There are a number of programs that can be used to create such an animation. I use Flow, pretty simple to use and it's included with setapp (an app subscription platform on mac). https://createwithflow.com/ You can also check out svgator, it's an online based solution. https://www.svgator.com/ Cheers!

Thanks
Post reply on HN