simonhamp.me

Why You (Probably) Shouldn't Start With an SPA :: simonhamp.me

Updated 1/28/2025

Excerpt

### Your front-end and back-end get decoupled! **Your back-end and front-end are always coupled.** So trying to split them in anything but the most extreme circumstances is an exercise in futility. I think this is probably the worst part of this whole story. If your back-end team want to move in one direction, they've got to align with the front-end team. If timings and priorities don't work out, it's going to force someone to either put a hold on some work that really needs sorting out or do some grunt work just to patch over a hole that's about to appear. … Deployments get unavoidably riskier in ways that are super difficult to test because testing distributed systems is really hard. Again, this might all be fine, *in the most extreme cases*, where you *need* the decoupling. Then this extra expense, and complexity, and churn-causing evil, is just a *necessary* evil that you have to learn to swallow and live with. … And both of those tools needed that power and have become fantastic tools because of it. But there is one pain point that it's created that's quite hard to escape: **the customisation story for each of these is harder because of it**. How so? Basically, because each tool needs to build the assets to ship their product. And once they're built it's hard for third-parties to build on what's already there. … ### Performance will suffer This isn't really an *extra* reason as Greg did touch on this a little already, but I wanted to go harder on performance. **You should never choose to build an SPA because of some supposed performance benefit.** That is the wrong hill to try and defend for many reasons, but primarily because you've got the whole of the web stack—on horses, with bazookas—nipping at your heels. … Sure, you can argue some of this advancement may have been *driven* by SPAs and their apparent benefits. But there's some inevitability to all of this (both the appearance of SPAs and the advancement of HTTP) which makes the whole argument moot in my opinion. As adoption and overall performance of the web platform increases, SPAs will even start to feel slow in comparison. Some feel slow already!

Source URL

https://simonhamp.me/blog/you-shouldnt-start-with-an-spa/

Related Pain Points