News for hackers. Stuff that matters.
Re:Rust needs a web framework for lazy developers by doctorpangloss on Sunday October 06, 2024 @05:56PM (#41760669)
For new web applications, why recommend alternatives to Next.js?

How do you convince someone to use an alternative? The knowledge needed to understand why will help you get close enough in Next.js anyway.

Re:Rust needs a web framework for lazy developers by googledocsftw on Sunday October 06, 2024 @06:30PM (#41760908)
1. Lots of dead ends. Fetch cache limit for example. Cant replicate prod page caching behaviour in dev. Etc. Many issues with 100 thumbs get abandoned.

2. NodeJS. Not everyone likes it.

3. It is slow. Yes it is! Try to get good web metrics with Next I dare you!

4. Premature release of App Router. Will they do something like that again.

Re:Rust needs a web framework for lazy developers by doctorpangloss on Sunday October 06, 2024 @06:58PM (#41761089)
I appreciate that you’re getting to the crux of the matter instead of downvoting.

In our experience elevating the web metrics in Next.js takes the same expertise as doing it in any other framework. Our experience with Vertx and Microsoft’s dotnet web frameworks have been good, but Next.js got us to a fast, featureful, performant website sooner and with more flexibility around requirements. I won’t pass judgement on rust frameworks I haven’t used, but it’s just to say that in an honest accounting, a naked backend framework is less than half the product when you’re talking about web applications actually worth making with original ideas. Unless you work at Google.

Re:Rust needs a web framework for lazy developers by googledocsftw on Sunday October 06, 2024 @07:25PM (#41761253)
Ok I will bite. How did you manage to get scripts to defer?
Re:Rust needs a web framework for lazy developers by doctorpangloss on Sunday October 06, 2024 @08:57PM (#41761769)
Code that we need later is `async import`-ed.

But for SEO, shouldn't Google be given a 100% pre-rendered, essentially static page? Next.Js plus our CloudFront seems to just support this.

Re:Rust needs a web framework for lazy developers by nopeYouAreWrong on Sunday October 06, 2024 @11:00PM (#41762396)
why are you fealung with cache at all in a wrb context? that's what CDNs are for.
Re:Rust needs a web framework for lazy developers by googledocsftw on Monday October 07, 2024 @02:37AM (#41763334)
React, like Haskell creates new problems you need sophisticated solutions for.

CDN is for content. Useless for say a Google search type problem. So I call an API endpoint for data in my component. But what if I get rendered 600 times? Well luckily I have memoized the call! As long as it was under 2Mb that is.

Re:Rust needs a web framework for lazy developers by drpossum on Sunday October 06, 2024 @07:17PM (#41761198)
The npm dependency ecosystem is extremely tangled. I work with node frequently, but there's plenty of opportunities for bad actors to introduce abuse and I'm wondering when the other shoe will drop.
Re:Rust needs a web framework for lazy developers by johnny22 on Sunday October 06, 2024 @06:07PM (#41760746)
Next.js is not nearly flexible enough. I'd never use it. It feels like rails, but somehow even more tightly coupled than that.
Re:Rust needs a web framework for lazy developers by linhns on Monday October 07, 2024 @07:02AM (#41764791)
I know TypeScript is available but not everyone can be convinced to adopt JS. I was part of that group until recently as I have been using strongly-typed language all my life.