Live data from Hacker News

Fresh – Next-gen web framework

fresh.deno.dev

201–210 of 463 posts

Re: Fresh – Next-gen web framework

#201

Earlier quoted context omitted.

Knowing what it is now, describing it that way makes total sense... but it only works for people after knowing what it is... kind of like an inside joke. For anyone wondering what it means: it ships only the JS for select components (usually ones that have some sort of client-side interactivity, such as the incrementing counter on their demo page), so it only has to hydrate that part (where hydration is reconciling t…

Reading about SSR feels like we went full circle.

We did… in arguably the dumbest way possible… it’s getting slightly better now as frameworks innovate on various ways to improve SSR … but when SSR first started being a thing it was literally stuff like “how do I run a j entire desktop browser, headless on my web server (or wedged in between with weird reverse proxy setups…) to pre-render the page HTML using the my Client side JavaScript of my single page app because I want to do things that my client side only framework wasn’t designed to do”

It wasn’t universally that bad but at its worst it was totally this bad.

Re: Fresh – Next-gen web framework

#202

Earlier quoted context omitted.

Knowing what it is now, describing it that way makes total sense... but it only works for people after knowing what it is... kind of like an inside joke. For anyone wondering what it means: it ships only the JS for select components (usually ones that have some sort of client-side interactivity, such as the incrementing counter on their demo page), so it only has to hydrate that part (where hydration is reconciling t…

Reading about SSR feels like we went full circle.

My understanding is that you're using a single codebase for rendering both on client and on server. And, of course, after loading server-rendered page, client code continues to work in the browser as expected.

So it's kind of best of both worlds and it makes perfect sense.

Re: Fresh – Next-gen web framework

#203

Earlier quoted context omitted.

Knowing what it is now, describing it that way makes total sense... but it only works for people after knowing what it is... kind of like an inside joke. For anyone wondering what it means: it ships only the JS for select components (usually ones that have some sort of client-side interactivity, such as the incrementing counter on their demo page), so it only has to hydrate that part (where hydration is reconciling t…

Reading about SSR feels like we went full circle.

Full circle make it sounds like we’re doing it only once. :)

I like to think of it as a Pendulum! Back and forth it goes.

Re: Fresh – Next-gen web framework

#204

Earlier quoted context omitted.

Knowing what it is now, describing it that way makes total sense... but it only works for people after knowing what it is... kind of like an inside joke. For anyone wondering what it means: it ships only the JS for select components (usually ones that have some sort of client-side interactivity, such as the incrementing counter on their demo page), so it only has to hydrate that part (where hydration is reconciling t…

Reading about SSR feels like we went full circle.

it would be interesting to understand what is different now. Because IMHO it's never 100% full circle. It looks like we're back at the same point, but there are usually crucial differences in the implementation details that makes it quite different.

Re: Fresh – Next-gen web framework

#205
post #179

Earlier quoted context omitted.

Instead of sending a rendering routine which then fetches data and renders everything on an empty page, they prerender a part of a template (constant) and send it along with fetch-data routine which only fills in missing values later. That’s why you sometimes see a form but its values are shaded for a while. This makes them think that you’re less annoyed because at least something is visible quicker. Island-based pro…

Isn't this how webpages used to work with jquery? Are you telling me everything just went full circle back?

Yep, we’re reinventing all the classic server side templating tech, but with “front end frameworks”… which I suppose is actually making them “full stack frameworks” but that’s beside the point.

Re: Fresh – Next-gen web framework

#206
post #179

Earlier quoted context omitted.

Instead of sending a rendering routine which then fetches data and renders everything on an empty page, they prerender a part of a template (constant) and send it along with fetch-data routine which only fills in missing values later. That’s why you sometimes see a form but its values are shaded for a while. This makes them think that you’re less annoyed because at least something is visible quicker. Island-based pro…

Isn't this how webpages used to work with jquery? Are you telling me everything just went full circle back?

Yes! But with Jquery you had to manually separate out the interactive elements ship those to the client. With newer frameworks (Svelte, Fresh), the framework itself automatically parses out the interactive elements and ships them. There's no context switch between interactive and non-interactive either, since all rendering is done with the same language and framework, and even the same file.

I think this is great.

I didn't hate jQuery. I just hated the context switch between regular HTML templates, and creating a jQuery component. If the entire frontend can be treated uniformly, that's a huge plus.

Re: Fresh – Next-gen web framework

#207

Earlier quoted context omitted.

Knowing what it is now, describing it that way makes total sense... but it only works for people after knowing what it is... kind of like an inside joke. For anyone wondering what it means: it ships only the JS for select components (usually ones that have some sort of client-side interactivity, such as the incrementing counter on their demo page), so it only has to hydrate that part (where hydration is reconciling t…

I'm not an Uncle Bob fan by any stretch of the imagination, but he wrote a somewhat famous article about this phenomenon: http://blog.cleancoder.com/uncle-bob/2014/06/20/MyLawn.html With each new wave - we get people that either lack the time, the willpower or the conditions to understand what came before them (the ground they're standing on), and this is how we end up rediscovering things every 2-3 years. It's much…

Yeah, he should know. There so much irony of this criticism coming from a guy that contributed to the max to the entropy of dubious and cargocult terms and "principles" in the field.

Re: Fresh – Next-gen web framework

#208

Earlier quoted context omitted.

Knowing what it is now, describing it that way makes total sense... but it only works for people after knowing what it is... kind of like an inside joke. For anyone wondering what it means: it ships only the JS for select components (usually ones that have some sort of client-side interactivity, such as the incrementing counter on their demo page), so it only has to hydrate that part (where hydration is reconciling t…

I'm not an Uncle Bob fan by any stretch of the imagination, but he wrote a somewhat famous article about this phenomenon: http://blog.cleancoder.com/uncle-bob/2014/06/20/MyLawn.html With each new wave - we get people that either lack the time, the willpower or the conditions to understand what came before them (the ground they're standing on), and this is how we end up rediscovering things every 2-3 years. It's much…

You can't compare JS SSR with PHP, SSR implies there is CSR which is not the case with PHP.

Then having one language, no, one _shared code base_ for both client and server, which automatically can only send the minimum necessary over the wire? That's a _huge_ step forward.

And I say this as someone who was developing CGI scripts before PHP came along.

Re: Fresh – Next-gen web framework

#209
Here are some of my thoughts:

It is using silly naming conventions in filenames as an alternative to specifying routes. eg /users/[name].tsx for /users/:name

It uses a manifest file. I remember when entity framework in C# had a separate file that represented the mappings of the database. The problem is the database and the manifest would get out of sync. I imagine the same thing would happen here.

There is no documentation about the islands or how they are implemented.

It uses JSX, which I don't think is even very nice.

It seems a lot of this "going back to server-side" is due to the slow and bulky nature of loading react on page load, but libraries built on top of native web components alleviate this issue to some extent. For many people, farming the rendering off to clients is faster if they don't have enough server capacity. After the first page load, client-side is faster. I am not sure how many people benefit from going back to server-side. I do think initial page load is very important though.

It says there is no build step but there has to be one because v8 runs JavaScript not TypeScript. The documentation for "swc" compares it to babel...

Re: Fresh – Next-gen web framework

#210

Earlier quoted context omitted.

Isn't this how webpages used to work with jquery? Are you telling me everything just went full circle back?

Yes! But with Jquery you had to manually separate out the interactive elements ship those to the client. With newer frameworks (Svelte, Fresh), the framework itself automatically parses out the interactive elements and ships them. There's no context switch between interactive and non-interactive either, since all rendering is done with the same language and framework, and even the same file. I think this is great. I…

[deleted]
Post reply on HN