Live data from Hacker News

Fresh – Next-gen web framework

fresh.deno.dev

431–440 of 463 posts

Re: Fresh – Next-gen web framework

#431

Earlier quoted context omitted.

Also, next/image only works with a CDN, ie Vercel, it doesn't work with static site generation. It's been an open issue for years and I honestly now feel like Vercel doesn't fix the problem on purpose, to push more people to using their service rather than simply exporting to a static host which are plentiful.

been saying it for awhile... Next.js is an ad for their services. Take a look at their middleware. It's designed to be used solely with their serverless cloud BS. It uses a janky JS sandbox which means you can't use node APIs. It's just horrible for no good reason at all. I've never seen middleware so intentionally crippled anywhere before. And the whole reason you need middleware is to maneuver around the flaws that…

AFAIK, Vercel middlewares use Cloudflare Workers, which are V8 isolates. Describing that as a “janky JS sandbox” is pretty funny.

Re: Fresh – Next-gen web framework

#432

Earlier quoted context omitted.

> except you can write code like it's not the old days. I imagine you mean that writing (frontend) code now a days is better than how it was in the old days. Well, at least from my perspective that's not the case. "Modern" frontend code requires: - a package manager (npm) - node (or deno or whatever) - transpilers (or is it plugins?) - TS - 10K+ dependencies And to be honest, what is all that good for? To being able…

If you think it's bad then why do you use it? Browsers still support just HTML. You can shove a just a script tag down in the page. Eventually, you'll have enough devs working on this you'll start to run into issues with how you coordinate your work. Your site becomes large enough the code gets more complicated and needs organising to work on it without slowing you down. You'll start to reinvent the above tools to so…

Taking it a little personal, eh?

Re: Fresh – Next-gen web framework

#433
post #264

Earlier quoted context omitted.

While Vanilla-PHP was definitely mostly just doing text substitution and had injection issues, there were other languages and template engines that were able to fix this by having more sensible defaults where raw-html interpolation is not a default. Also, keep in mind that injection attacks are definitely still possible with modern frameworks. The same old techniques apply when you're dealing with data originating fr…

The comparison I am responding to is original PHP ("30 years ago", which itself is garbage of course, given the language did not exist 30 years ago), not the new goalposts you have planted.

I'm not disputing anywhere that the original PHP has issues, and in fact I'm acknowledging that in the beginning of the first paragraph. Adding additional information and context is not moving goalposts.

What I'm actually reacting to is the rude provocation at the second paragraph that grandparent must "Look at the actual tech here. Do a tutorial. Discover what the difference is".

They probably don't have to, because this specific advantage is not novel.

...not that this deserved any answer, considering the original reply is now flagged/dead. Maybe someone should tell you to check the website guidelines.

Re: Fresh – Next-gen web framework

#434
post #423

Earlier quoted context omitted.

“The page remembers the click” was the original intent [0], but the latest version of React includes a feature called selective hydration [1] which can hydrate a component synchronously in response to an event if possible (i.e. without replaying the event). Naturally React itself has to be loaded for any of that to work. [0] https://twitter.com/dan_abramov/status/1200118229697486849 [1] https://github.com/reactwg/rea…

Follow up: How does the HTML "remember" the events to replay without any help from Javascript?

It doesn’t. This only works once React itself (i.e. the JavaScript code for the library) has loaded, which usually happens pretty quickly. The user-written React components might not finish loading until much later.

Re: Fresh – Next-gen web framework

#435
post #326

Sometimes I wonder how much time humanity as a species has collectively spent first inventing and then trying to solve the problem of "making a website".

The funny thing to me is that "we" went from server-rendering to client-rendering to server-rendering again.

Re: Fresh – Next-gen web framework

#436
post #413

"No build step" is a weird pitch when what actually happens is that, in production , they'll fetch a WASM module on the fly to do bundling at request time . That build step was there to avoid doing this work over and over! https://github.com/lucacasonato/fresh/blob/458fe2ca3c12508a6... https://github.com/lucacasonato/fresh/blob/458fe2ca3c12508a6...

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.

I didn't say every request.

It'll still happen on every cold serverless request, every first request to every scale-up VM, ...

Re: Fresh – Next-gen web framework

#440

Earlier quoted context omitted.

I've heard really good things about Remix, especially the nested routes. But I think Next is trying to copy that in Layouts? https://nextjs.org/blog/layouts-rfc I use Next not just for the routing and composition and hydration, but for all the other quality-of-life improvements (image resizing, buildchain configs, hot reload), especially when it's paired with Vercel (per-push sandbox builds, stale-while-revalidate, s…

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.

All of tech is just people borrowing from each other. It's a good thing! I wish IP patents weren't a thing.
Post reply on HN