Live data from Hacker News

Second-guessing the modern web (2020)

macwright.com

11–20 of 309 posts

Re: Second-guessing the modern web (2020)

#11

This is the money quote for me: > Frameworks should lure people into the pit of success, where following the normal rules and using normal techniques is the winning approach. > I don’t think that React, in this context, really is that pit of success. A naïvely implemented React SPA isn’t stable, or efficient, and it doesn’t naturally scale to significant complexity.

React is famously not a framework though. Next is the relevant example here, which actually does work to address a bunch of the complaint points, including doing full page reloads when you’ve deployed a new version of the app.

Re: Second-guessing the modern web (2020)

#13
post #5

One day browsers will natively support modules and "Bundle Splitting" as the article calls it will just be the intuitive and automatic thing to do. Until then we have webpack.

Unless you're still supporting IE, which is a big gotcha for some I know, then modules are a go now: https://caniuse.com/?search=modules

Vite is one of the first tools I know of taking advantage of this: https://vitejs.dev/

"On demand file serving over native ESM, no bundling required!"

I just launched a small production site using SvelteKit, which now uses this under the hood.

Re: Second-guessing the modern web (2020)

#14

> "There are decent patterns in the form of GraphQL, but for a React component that loads data with fetch from an API, the solutions have only gotten weirder. There’s great documentation for everything else, but old-fashioned data loading is relegated to one example of how to mock out ‘fetch’ for testing, and lots of Medium posts of varying quality." What is "old-fashioned data loading"?

The truly old fashioned way is to load your data and render the page with it in the server. A simplicity that was lost in the SPA, but that's what SSR gives back to you. But since this is an anti-SSR piece I'm not sure what it's getting at.

The problem with SSR, as I understand it according to this article, is that it still removed native link handling from clicks, resulting in the need to override all the basics with bulky JavaScript that doesn't load until some time after rendering.

Which, as a user, has bitten me many times. I hate hate hate when a page seems loaded, but something has stalled, and I can't interact with anything.

As much as I hate Java, I still kind of long for old fashioned Tomcat web apps that sent out fully formed and usable HTML with small bits of JavaScript enhancements.

Re: Second-guessing the modern web (2020)

#15
post #11

This is the money quote for me: > Frameworks should lure people into the pit of success, where following the normal rules and using normal techniques is the winning approach. > I don’t think that React, in this context, really is that pit of success. A naïvely implemented React SPA isn’t stable, or efficient, and it doesn’t naturally scale to significant complexity.

React is famously not a framework though. Next is the relevant example here, which actually does work to address a bunch of the complaint points, including doing full page reloads when you’ve deployed a new version of the app.

React famously claims not to be a framework. Many, myself included, would argue that it is very much a framework in every way that matters.

Re: Second-guessing the modern web (2020)

#16
I saw this referenced in the job ad for a "Software Engineer: Web" on the Oxide careers page yesterday.

More of a meta comment, but it's funny how interesting things link to more interesting things, and the "HN web crawler" inevitably finds and identifies them.

Re: Second-guessing the modern web (2020)

#18

This is the money quote for me: > Frameworks should lure people into the pit of success, where following the normal rules and using normal techniques is the winning approach. > I don’t think that React, in this context, really is that pit of success. A naïvely implemented React SPA isn’t stable, or efficient, and it doesn’t naturally scale to significant complexity.

It is a pointless generalization. Not every React SPA is the same. Some scale, some don't. Some use server rendering, some don't. React may be a perfect fit for your app, or it may not. It's not like a "naively implemented" app using vanilla JS or server templating or any other framework will be automatically fast and scalable. Quality of input = quality of output, regardless of what abstractions you decide to use in the middle.

Every " is good/bad" article eventually reduces down to an internet flame war ignoring all nuance.

Re: Second-guessing the modern web (2020)

#19
post #15
post #11

Earlier quoted context omitted.

React is famously not a framework though. Next is the relevant example here, which actually does work to address a bunch of the complaint points, including doing full page reloads when you’ve deployed a new version of the app.

React famously claims not to be a framework. Many, myself included, would argue that it is very much a framework in every way that matters.

Which ways are those?

Re: Second-guessing the modern web (2020)

#20
I have a very good idea of how the web used to work 10 years ago.

But when I try to learn Modern Javascript frameworks, the tutorials rarely do a good job of explaining that they won't teach me how to create a normal, traditional website, or if it's even possible to create a normal website with the framework. They simply assume that the modern way is the standard way.

I want a modern alternative to PHP, but the JS community doesn't make it easy to learn JavaScript.

At least I know how things used to work. Imagine a newbie that never developed a normal website and now thinks React/client-side rendering is how the web is supposed to work. They won't even be able to understand the tradeoffs being made for them.

I want a modern language and framework that still makes sane decisions, and when it does weird things (e.g. client side rendering being the default) at least tells you upfront that it's making those decisions, and their implications.

Post reply on HN