Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

SPA is one of the worst things to happen to the web. There are a small number of instances where it makes sense but it just ruins sites like Reddit, especially on a mobile device.


I've had this conversation a lot lately with a friend of mine who is a React developer. And I recall a thread on HN where someone broke it into a dichotomy.

There are those who believe strongly in the web as interactive documents. I fall largely into this camp. I want small pages with a minuscule amount of JS.

On the other hand, there are those now using the web as a distribution platform. My favorite example is Figma. Figma is my favorite vector graphics program of all time. Compare it to something like Illustrator, but with file syncing, collaboration and updates abstracted. I don't have to expose myself to the horror of Adobe bloat.

So I must disagree. SPA and the rise of JS frameworks is not one of the worst things to happen to the web. Look at what Facebook has become. It's an application, not a website of interactive documents. Or see what GitHub is doing. They are soon to integrate a whole IDE into the browser with Codespaces. I'm bullish on WASM as well. I envision a future where all software could be distributed via the browser.

The problem I think is that too many companies have become overly ambitious and bought into a lot of unnecessary tech. Reddit is a great example, and they are also guilty of pushing their native app incessantly.

The problem isn't the technology. It's the misuse of the technology.


To be completely fair, Reddit is an absolutely terrible SPA to begin with. The infinite scrolling is very poorly implemented (if you click a link and hit the back button, you end up at the top of the infinite scroll page and have to wait for it to load everything below again), the memory usage is higher than any other app on my computer, and collapsing comment threads takes forever.

The Apollo app solves every technical problem with Reddit, so I just recommend that people use that instead of dealing with the official web app. Luckily, they haven't gotten rid of old.reddit.com.


When do you think SPA’s are the best fit?


SPAs are the best we can do for... applications. Online spreadsheet? SPA. Document editor? SPA. Image editor? SPA. Visual programming environment? SPA. IDE? SPA. Facebook makes sense as an SPA too - it's basically a rich widget "dashboard" app with some content creation applications inside of it. Building applications for the web is still not the greatest experience because you're fundamentally building an application over hacks built to expand an abstraction built for hypertext content (the DOM). But, honestly modern JavaScript frameworks, TypeScript, and transpiled environments like Elm all do an admirable job working with what they have.

On the flip side, SPAs are terrible for hypertext content, because existing web technology was literally built for that. Why should a blog be an application? The content creation side, sure, maybe, but viewing a blog? That's literally what HTML was made for. A table of contents full of links like the HN or Reddit homepage? That's pretty much hypertext 101.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: