4 ms·
But that's exactly the point of SPAs - they load once and run locally even when changing "pages", syncing just data. It's just like a normal desktop app embedde
by amonith 2y ago
But that's exactly the point of SPAs - they load once and run locally even when changing "pages", syncing just data. It's just like a normal desktop app embedded in the browser page.
If they expose the PWA manifest they can also be installed so that they won't require the internet even for the initial load.
The old school MPAs were the ones that required the network for every single interaction.
- pjc50 2y agoReddit-style SPAs combine the worst of these features: a large initial load plus every single feature requires network interaction, because all the data is on the server anyway. This type of SPA has invented a new version of "FOUC" as well. Because the data for the front page doesn't come with the page, you get a set of placeholder items rendered.
- amonith 2y agoYeah read-heavy apps shouldn't be SPAs. There's just nothing useful to show or do in there without data. However if a native desktop version of reddit existed it would have exactly the same problem, so it isn't really a tech issue, they just picked the "wrong" approach (probably for DX + talent pool reasons).
- stavros 2y agoPerhaps SPA developers should get this memo, because 95% of SPAs should be MPAs.
- amonith 2y agoCan't argue with that, because most public-facing "apps" are mostly read-only. However after a bunch of years working for a software house I can tell you that there are a lot of "non-user" reasons for choosing SPAs. The ecosystem of all SPAs offers unparalleled developer experience that allows you to create many complex apps really fast and reuse a shitload of components, interactions, animations and whatnot. With basically 0 effort you can also create mobile and desktop apps from the same code. And the talent pool for something like React is a lot bigger and a lot more "UI/UX-friendly" than in whatever "backend-tech" of your choice. I work in .NET and when we recruit devs a lot if not most of them straight up hate frontend or don't care about UI/UX at all so we kind of can't do shit with them alone anyway. It's easier and cheaper to recruit a bunch of React devs. TL;DR: money math works in SPA's favor, users be damned
- stavros 2y agoEh, most of the components you can reuse would work OK as pure HTML components anyway, and the "create many complex apps really fast" is definitely true, except a year down the line the app is a complicated piece of spaghetti you have to rewrite. Ask me how I know...
- amonith 2y ago> except a year down the line the app is a complicated piece of spaghetti you have to rewrite Small correction from a software house perspective: except a year down the line the app is a complicated piece of spaghetti THE CLIENT has to rewrite OR PAY YOU TO REWRITE :D And with this: > most of the components you can reuse would work OK as pure HTML components anyway I unfortunately cannot agree. It is theoretically true from pure "it's possible" standpoint but it was not my experience in pre-jQuery times. The shit backend devs did with concatenating html + JS snippets as strings wrapped in various patterns like the builder to make it configurable was pure maintenance horror. I don't miss it at all.