News for hackers. Stuff that matters.
Re:SPAs Were a Mistake by scarmig on Wednesday March 02, 2022 @06:06PM (#30534685)
> You aren't mixing state across server and client. Single Source of Truth is a thing for a good reason. If you have a stateful backend, and your front end naturally has the state of whatever the user has input, you now have to work to keep those two in sync.

This is a bit weird to me, in that I'd say that cuts in the opposite direction. State can exist in at least three locations for most applications: db, app server, and client. Keeping state consistent across all of them can be difficult in the best of times, but thin clients by their very nature carry less state, lessening the burden. Sometimes client state is necessary, for richer user interactions, but for all but the most cosmetic of purposes you're going to have to replicate that state on the backend anyway, to enforce business and security requirements.

Re:SPAs Were a Mistake by westoncb on Wednesday March 02, 2022 @06:38PM (#30535056)
> but for all but the most cosmetic of purposes you're going to have to replicate that state on the backend anyway, to enforce business and security requirements.

This really just comes down to what you're writing, how app-like your web app is. It's too easy to have one's own experience focused in a certain area and estimate the remaining majority as relatively similar. (For most of what I personally work on, the DB portion is mostly a simple straightforward serialization of what the user has built through the application; whereas client-side state has so many aspects to it I couldn't give a brief characterization—the whole app is basically client-side.)

From what I can tell most of the disagreement about SPAs results from devs who are building things that aren't app-like railing against their futility vs devs who are, who become perplexed by the vitriol when they have immediate experience with their architectural benefits.

Re:SPAs Were a Mistake by shkkmo on Thursday March 03, 2022 @01:38AM (#30537881)
> From what I can tell most of the disagreement about SPAs results from devs who are building things that aren't app-like railing against their futility vs devs who are, who become perplexed by the vitriol when they have immediate experience with their architectural benefits.

The SPA criticics from the article and this thread have repeatedly said that their issue is not with building things that need the benefits an SPA architecture brings. The criticism is that the majority of SPAs are harmed by that architecture because it is the industry default and being used when it isn't appropriate.

Re:SPAs Were a Mistake by westoncb on Thursday March 03, 2022 @02:28AM (#30538157)
I get that that's the biggest problem, but there are plenty of people in the thread talking about how they're a bad idea in general (including the comment I was replying to)—which incidentally lines up with the (apparently) clickbait title "SPAs were a mistake".
Re:SPAs Were a Mistake by scarmig on Thursday March 03, 2022 @10:02AM (#30541903)
For the record, I was making a general point about one of the tradeoffs with an SPA vs MPA, not making the claim that MPAs are universally better than SPAs for all use cases. I think most reasonable people can agree that there are places where SPAs are called for and places where they're not. It's the ambiguous cases that draw the conflict, and psychologically the anti-SPA people focus on the really shitty ones and the pro-SPA people focus on the use cases that would be impossible in an MPA.

Also, for what it's worth, I've worked full-time on one of the largest SPA projects in the world (~500 engineers contributing frontend code to it on an average week), so this is not coming from a place of total ignorance.

Re:SPAs Were a Mistake by westoncb on Thursday March 03, 2022 @10:33AM (#30542308)
I excerpted and replied to something specific from your comment which read to me as essentially "even the cases that seem to need it probably don't" which matches both the tenor of (many of) the replies and the title of the article. But if I misread you my apologies.
Re:SPAs Were a Mistake by Ensorceled on Thursday March 03, 2022 @06:00AM (#30539488)
That’s the thing, they are a bad idea in general because, in general, people ARE building things that don’t benefit from an SPA article. You’re the one extrapolating that they are saying ALL SPAs are bad.
Re:SPAs Were a Mistake by westoncb on Thursday March 03, 2022 @10:44AM (#30542430)
> You’re the one extrapolating that they are saying ALL SPAs are bad

This was not my extrapolation. But if you skim over a comment you're likely to perceive it as falling into one broad camp or another whether that's the case or not.