4 ms·
> ...if you shared that misunderstanding of SPAs and used them to solve the wrong problem, this article is 100% correct. Agreed. The article was a frustrating
by cheema33 1y ago
> ...if you shared that misunderstanding of SPAs and used them to solve the wrong problem, this article is 100% correct.
Agreed. The article was a frustrating read. The author is an SEO consultant. SEO consultants likely have a heavy focus on marketing websites. Actual apps and not marketing websites do benefit significantly from SPA. Imagine building Google Maps without SPA. You can animate page transitions all you want, the experience will suck!
- Tokumei-no-hito 1y agoto be fair to both points: he has a really warped view that SPAs are somehow purely about routing. he does correctly point out that a lot of sites could and should be treated as sites not apps.
- pyman 1y agoI agree with you. The author's point is that browsers have finally understood why some traditional sites were created as SPAs, which involves recreating some of the functionality browsers already offer today. But that doesn’t mean all SPAs should turn into MPAs now. IMO it will be hard for some traditional sites to adapt to the new browser capabilities, since we've built an entire ecosystem around SPAs. The author's advice should've been: use the browser's built-in capabilities instead of client-side libraries whenever possible. Also, keep in mind he's sharing his own experience, which might be different from ours. I've used some great SPAs and some terrible ones. The bad ones usually come down to inexperience from developers and hiring managers who don't understand performance, don't measure it, don't handle errors properly, and ignore edge cases. Some devs build traditional sites as SPAs and leave behind a horrible UX and tech debt the size of Mount Everest. If you don't know much about software architecture, you're more likely to make mistakes, no matter what language or framework you're using. I realised years ago there's no "better" language, framework, platform, or architecture, just different sets of problems. That's why developers spend so much time debating implementation details instead of focusing on the actual problems or ideas. And that's fine, debates can be useful as long as we don't lose sight of what we're trying to solve and why. For example: Amazon's developers went with an MPA. Airbnb started as an MPA but now uses a hybrid approach. Google Maps was built as an SPA, while the team behind Search went with an MPA.
- docmars 1y agoEven for basic sites, I tend to reach for an SPA because I never know when I'll be adding dynamic features, anything from basic showing / hiding of content, list / configuration-based rendering, or requesting data. It's usually inevitable, so it's easier to scaffold a Vite template and get cracking without any additional setup. The time-to-deploy is fast using something like Netlify or Vercel, and then I have the peace of mind knowing I can add additional routes or features in a consistent, predictable way that fits the framework's patterns. I'd hate to develop an MPA and realize after the fact that now I need complex, shared data across routes and for the UX to be less disrupted by page loads. Once you've dug that hole, you either have to live with it, or face a painful rewrite later. The exception I often see is targeting mobile devices in low-bandwidth areas where larger application bundles take longer to load, but I have to wonder how often this is the target audience. I live in a place where mobile data speeds are horrible, and access to WiFi is abundant, but even so, I rarely have a situation where I *need* to load up a non-critical site on the go — and having apps pre-installed doesn't really help either when the data they're requesting is barely trickling in on mobile. So this oft-used exception doesn't really make sense to me unless I learned why this is so critical for some people.
- pyman 1y agoI agree. There's a rich ecosystem for building SPAs with MACH architecture. There’s no going back now, not even for basic apps.
- docmars 1y agoFor scale, this is the easiest approach. Teams can focus on their roles and specialize more, which leads to higher efficiency as team members build their rhythm and stay focused on what they're great at. At my company, our React SPA uses just over 500+ components across maybe ~30 views, with many smaller components alongside many of them in the same files. Our bundle size is obscene, but our customers are using fast PCs on fast connections. Once it's cached, they're good -- and each new release is roughly every 2-4 weeks, so fresh visits are painless. As for server-side rendering from RSC, Next, Nuxt, and SvelteKit, I'd say they're overkill in most situations. The amount of people deploying simple sites on Vercel using Next.js, not really using its features, is just silly (and costly).
- graealex 1y agoSPAs are about APIs, and leaving the rendering entirely to the client. It's a reimagination of ye Olde three tier approach. Perfect for apps.
- cosmotic 1y agoGoogle maps is a mess these days. Its glitchy, slow, has broken navigation, and is overloaded with unpredictable dynamic content. It's even worse in the native android app. Id totally go for the original version but with the more recent vector maps.
- scott_w 1y agoThe reasons it sucks are nothing to do with it being an SPA, though.
- cosmotic 1y agoBeing an SPA is certainly the cause of the glitchyness and slowness as complex content dynamically loads and shifts around. It's also certainly the cause of the broken navigation, just like the original article explains.
- scott_w 1y ago> Being an SPA is certainly the cause of the glitchyness and slowness as complex content dynamically loads and shifts around. Incorrect. > It's also certainly the cause of the broken navigation, just like the original article explains. Also incorrect. The Google Maps app is also total garbage. It’s not an SPA, so that’s clearly not the cause.
- danielscrubs 1y agoI 100% would like to see an MPA Google Maps. Being able to come back to a webpage with previous directions? I think it would be glorious.
- pas 1y agoYou are mixing up linkability/history and being an MPA/SPA. Many websites simply have some session/state dependent page.
- danielscrubs 1y agoGoogle Maps cant even preserve state in their iOS app. They are either the worst developers in the world or it is not simple. I don’t rule any of the two possibilities out. Some things you get for free with the correct architecture. For whatever reason, SPA does not have a great track record with their users.
- Quarrel 1y ago> They are either the worst developers in the world or it is not simple. Or they have a good reason to not do it (in some PMs mind). At a guess, resetting the view, and displaying the nearest Domino's Pizza sponsored highlight pin on the map, could be one of them.
- al_borland 1y agoMy biggest gripe with Google Maps is when I pan to a specific area, hundreds, or even thousands of miles from my current location, then search for something like “restaurants” and it pans me back home and searches there, so I then have to go find my distant location again and click the search here button. If this is an intentional choice, all in an effort to show me more local ads… ugh. I really hope this isn’t the case.
- Quarrel 1y agoI hate that too. Even when it is just across the one city, it is a major pain in the ass.