Earlier quoted context omitted.
liveview still uses JS, its just rather out of the way in what it does edit: livewire in laravel land does a similar approach - tho not as fast currently, leverages alpine.js under the hood
While we use JS and websockets, even with js disabled or curling the page will send all the HTML. So the initial render is strictly a regular html page with all your expected content.
JavaScript hydration is a workaround, not a solution
161–170 of 239 posts
Re: JavaScript hydration is a workaround, not a solution
#162...get a PageSpeed score of 100/100 I'm slowly coming around to the idea that PageSpeed (or Lighthouse, or Core Web Vitals, or whatever Google has invented this week) is what drives a lot of the complexity in web app dev. People refuse to throw out what they've learned, so every time there's a new metric to chase in case you lose SERPS ranking for being slow! devs heap another layer of complexity on to the Webpack bo…
Speaking as the TL of Lighthouse and PageSpeed, I can comfortably say that adding complexity is antithetical to our goal. Quality UX and a reliably performant web is what we want for all users. Ideally, folks would use a thinner stack with _less_ JS, as that's rewarded across all the metrics. But in recent years, many teams build a "site" by building a SPA. As they're entrenched in that dubious decision, the only pat…
+ PMs wanting to run dozens of AB tests at once in every single page
Re: JavaScript hydration is a workaround, not a solution
#163...get a PageSpeed score of 100/100 I'm slowly coming around to the idea that PageSpeed (or Lighthouse, or Core Web Vitals, or whatever Google has invented this week) is what drives a lot of the complexity in web app dev. People refuse to throw out what they've learned, so every time there's a new metric to chase in case you lose SERPS ranking for being slow! devs heap another layer of complexity on to the Webpack bo…
Another theoretical advantage is that you can get better colocation of content, style and functionality.
Basic JS is pretty annoying to write. It reminds me of using goto for control flow. It’s a lot cleaner to be able to put functionality alongside the document structure.
Of course, you can use HTML + CSS + JS but you can also use Assembly for all code. But the end solution here is not Frontend frameworks.
I think it’s time browsers give us a better abstraction to HTML + CSS + JS. Webassembly and friends are nice, but I think the 3 fundamentally need to be replaced together in a performant way such that the simple case of no client side code is well optimised. Frontend frameworks are just a symptom of the problem which is that Web devs have to use the only abstraction creation mechanism available to get nicer development properties.
Re: JavaScript hydration is a workaround, not a solution
#164Earlier quoted context omitted.
While we use JS and websockets, even with js disabled or curling the page will send all the HTML. So the initial render is strictly a regular html page with all your expected content.
right, i get that - and liveview is a sick piece of kit, so congrats. just saying that for what most would use it for - it is still using some JS
edit: much like the SSR being described
Re: JavaScript hydration is a workaround, not a solution
#165Earlier quoted context omitted.
realistically speaking, if done correctly - SSR would allow the site to work without JS. Now, in practice, that comes down to what is required on the client side for interactivity - which is a case by case basis, and if your site doesn't require JS on the FE at all, why would you use it for the backend
Yeah, but at the same time, who the hell would use nuxt/next for the type of site that is perfectly usable without js.
Re: JavaScript hydration is a workaround, not a solution
#166Earlier quoted context omitted.
liveview still uses JS, its just rather out of the way in what it does edit: livewire in laravel land does a similar approach - tho not as fast currently, leverages alpine.js under the hood
While we use JS and websockets, even with js disabled or curling the page will send all the HTML. So the initial render is strictly a regular html page with all your expected content.
Re: JavaScript hydration is a workaround, not a solution
#167Of all the terms in tech "hydration" makes me cringe the most.
Re: JavaScript hydration is a workaround, not a solution
#168...get a PageSpeed score of 100/100 I'm slowly coming around to the idea that PageSpeed (or Lighthouse, or Core Web Vitals, or whatever Google has invented this week) is what drives a lot of the complexity in web app dev. People refuse to throw out what they've learned, so every time there's a new metric to chase in case you lose SERPS ranking for being slow! devs heap another layer of complexity on to the Webpack bo…
If you do this and have a sufficiently complex application... you will end up where the modern frameworks are. They exist for a reason.
Re: JavaScript hydration is a workaround, not a solution
#169...get a PageSpeed score of 100/100 I'm slowly coming around to the idea that PageSpeed (or Lighthouse, or Core Web Vitals, or whatever Google has invented this week) is what drives a lot of the complexity in web app dev. People refuse to throw out what they've learned, so every time there's a new metric to chase in case you lose SERPS ranking for being slow! devs heap another layer of complexity on to the Webpack bo…
Frontend frameworks often have better developer experience. I want to use one because it’s less annoying to do thing like template HTML with editor completions, than using HTML. Another theoretical advantage is that you can get better colocation of content, style and functionality. Basic JS is pretty annoying to write. It reminds me of using goto for control flow. It’s a lot cleaner to be able to put functionality al…
Agreed. As I've been developing a service (https://prose.sh) with no javascript and only go templates, the biggest downside is autocomplete.
Re: JavaScript hydration is a workaround, not a solution
#170The recent evolution of JS frameworks has been really nice. Performance is basically getting identical to desktop. The three recent developments I've noticed: - "Islands" in Deno https://fresh.deno.dev/ and https://remix.run/ where only small isolated parts get hydrated, instead of the whole page - Using http://linear.app style data-flows ala Replicache ( https://replicache.dev/ ) where JSON data is preloaded for all…
> The recent evolution of JS frameworks has been really nice. Performance is basically getting identical to desktop. Web browsers in general are not able to match applications on the desktop. Additionally, typical JS frameworks come with at least a 2x performance penalty compared to hand-optimized vanilla JS (Not a commonly done thing). Being excited about getting reasonable performance with a great development envir…
What's the actual issue though? Sure on HN we care a lot about performance. But outside these walls performance has to be really bad for someone to actively avoid it. Even then, if the product has a stronghold on its userbase, you have to really degrade performance for engagement to falter.