Live data from Hacker News

Fresh – Next-gen web framework

fresh.deno.dev

441–450 of 463 posts

Re: Fresh – Next-gen web framework

#441

Earlier quoted context omitted.

It's funny to me to see how many people say Next is copying something about remix when the entire remix thing is a copy of Next. Heck, I've heard in a podcadt they're even working on a hosting platform copying vercel.

For sure, Vercel was working on nested routes before Remix was a thing, as far as I know. A lot of people suggested it was lifted from Remix. It’s not a new idea at all and people have been asking for it for years. Arguably there is nothing all that novel in either framework. We are constantly reiterating and rebuilding wheels, doing it a little better each time. I’m glad to see the Remix take in things gaining steam…

Eventually React is just going to become Angular3, lol

Re: Fresh – Next-gen web framework

#442
post #31

Quoted post unavailable.

That’s because it’s literally, not conventional templates. It is, from what I gather, Preact components, which can be rendered on the server and client isomorphically. The same component code runs on both sides. That’s not templates.

> which can be rendered on the server and client isomorphically. The same component code runs on both sides.

You mean portably. If the same code runs in multiple environments, it's running portably.

Re: Fresh – Next-gen web framework

#443
post #413

Earlier quoted context omitted.

Maybe it has a cache and this only happens the first time? It would be a bit ridiculous to re-compile JSX into JS on every request.

Yeah, it doesn't do this. The transpiled output is cached indefinitely for a given deployment.

Hey Luca, any chance you might add other front end frameworks in addition to Preact?

Re: Fresh – Next-gen web framework

#445
post #149

Earlier quoted context omitted.

You still have transfer the JS.

ITT, it was finally proven that JS is not code.

I don't think anyone believes JS is a great language. It's just what we're stuck with.

How I wish something, anything better could've taken over. .NET was beautiful to work in. Maybe the native apps for iOS or Android are cleaner (I dunno, never tried).

But browsers are what the world use, and they only speak HTML and Javascript (sadly). So we're stuck unless something else manages to create a sea change in how the world uses the internet.

Re: Fresh – Next-gen web framework

#446
post #393

Earlier quoted context omitted.

> 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 not the old days. Hydration is actually a compromise, and not a great one for UX. It’s in fact been said to be “pure overhead”, which I think is an overstatement but only slightly. What you’re describing in the abstra…

For all the improvements pioneered by Marko, why is eBay still so slow (compared to equivalent ecommerce sites in Next.js and similar)?

I’m not sure why you’re asking me, but I just did a quick “how slow does eBay feel” on my really spotty mobile connection and it didn’t feel slow at all. Faster than HN, which is usually my fast baseline that responds even when I’m not coaxing my network settings.

Re: Fresh – Next-gen web framework

#447
post #411

Earlier quoted context omitted.

Makes me think of Scheme and SXML, where you never leave the context of the language. Transfer that to something statically typed, and you would get what you want. Maybe something like that exists in Haskell or a similar language?

Tsx is the templating language that is also typescript. So the “controller” and the template are the same function.

So, if I throw `tsc` at the `.tsx` file, you are saying it will work, without any other library (only `npm install tsc`, nothing else allowed)? Don't you have to install additional frameworks, that work with tsx/jsx for that?

Afaik `tsc` deals with `.ts` files and nothing else, making typescript and `tsx` actually 2 separate languages, as the name suggests "typescipt extended", but maybe I am wrong.

Re: Fresh – Next-gen web framework

#448
post #231

1. With this approach of sending "only the small JS chunk needed for interactivity" aren't we going to end up with the situation where chunks A and B need common part C? And what if C needs D etc. There should be provided a dynamic modules loader. Is it implemented in all those hydration based frameworks? 2. How is solved the situation when is delivered to the user, but "onClick" action is not because network failed?

> Is it implemented in all those hydration based frameworks? I can't speak for all frameworks, but fresh can dynamically break out shared dependencies so you don't have to download the same code twice. > How is solved the situation when is delivered to the user, but "onClick" action is not because network failed? Developers need to deal with this in their applications. The counter example on the fresh homepage uses f…

Ooh, I like that.

Re: Fresh – Next-gen web framework

#449

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…

Frameworks like Next or Nuxt often render each page server-side, shipping HTML to the client, but then also send enough javascript and json data to the client to "hydrate" the page back into fully interactive components. The whole site, then, really acts as one large javascript app once fully loaded. The islands approach is different: pages are server rendered, but you can easily define islands of interactivity (like…

The main dev on Slinkity has moved onto Astro. Just an fyi and yes Astro fan here. Mental model feels very productive.

Re: Fresh – Next-gen web framework

#450
post #442
post #31

Earlier quoted context omitted.

That’s because it’s literally, not conventional templates. It is, from what I gather, Preact components, which can be rendered on the server and client isomorphically. The same component code runs on both sides. That’s not templates.

> which can be rendered on the server and client isomorphically. The same component code runs on both sides. You mean portably. If the same code runs in multiple environments, it's running portably.

Isomorphic is the accepted term for this pattern.

https://en.wikipedia.org/wiki/Isomorphic_JavaScript

Post reply on HN