Re:You Shouldn't Start with an SPA
by klysm on Friday February 02, 2024 @10:21AM
(#39229607)
You should start with an SPA if it makes sense for what you are building.
[ Parent
| on HN ]
Can you give an example?
Complex admin dashboard with lots of interactions that should be low latency
Yeh I've seen some of those as SPAs... ouch
Honestly, I'd rather not be presented with an empty grid of spinners tbh
I think you can get something useful on first render and then dynamically update from there (either with polling, SSE or WebSockets) all without the added complexity of an SPA
Re:You Shouldn't Start with an SPA
by spiderxxxx on Friday February 02, 2024 @02:45PM
(#39233228)
I make mine such that the first load includes the data needed in the first load of the page. If you're going to populate a grid on the first load, just have the backend include that in the page itself inside a dynamically inserted javascript block. For something like paged search results, you can preload the first page, and preload the second page a short while after that.
You can have complex interactions with an MPA.
Regarding latency, it's mostly related to the distance between the user and the database. The routing strategy has nothing to do with that.