Today’s rant is inspired by yet another website that managed to waste 20 minutes of my time. It was a web-app that lost all of my input after I spent that time filling the forms and tried to submit. The app belongs to a international corporation and probably cost hundreds of thousands of dollars to develop, but it’s not unusual.
So, somehow, the brightest idea of web development in the last couple of years is that everything should be a single page application. Interactive game? Make it a SPA. A single-page website with some content? SPA. Multi-page series of forms? You guessed it, SPA.
I’m here to tell you that it’s not, usually, a very good idea. Why? For starters, you are abandoning basic web browser features, because your app breaks some assumptions browser makes about web content.
Here’s a partial list of things that you lose, and have to re-implement:
- History operations
- Deep linking
- Basic accessibility features
- Search-engine readability
I get it – the code surrounding navigation has some tricky bits, and it is boring to test it thoroughly. But guess what? – users don’t care about that.
Maybe you think you are special and you will not make any of those mistakes? I envy your confidence, but I’m sorry for your users. Because companies like Twitter and Facebook – with all their billions of dollars and armies of (supposedly) the smartest programmers – routinely cause navigation bugs.
Not only that, but also that projects often start as SPAs just because it’s the default approach in given org, without bothering to analyze if it makes any sense in the given context. And all that SPA-specific cruft is usually the first thing built. But hey, why waste time thinking what your users actually need if you can spend it re-implementing navigation, poorly?
BTW, I googled for other blog posts on the web that talk about SPAs. In ironic twist, the first result for my query, which seems to be a corporate blog, fails to show any text. The page loaded, but instead of the blog content, I see infinitely-scrolling loading circle. Why? Because some moron thought that a blog should be implemented as a SPA. You had one job – show me text – and you still managed to fail.