News for hackers. Stuff that matters.
Re:You Shouldn't Start with an SPA by simonhamp on Friday February 02, 2024 @01:00PM (#39231903)
Can you give an example?
Re:You Shouldn't Start with an SPA by klysm on Friday February 02, 2024 @01:06PM (#39232000)
Complex admin dashboard with lots of interactions that should be low latency
Re:You Shouldn't Start with an SPA by simonhamp on Friday February 02, 2024 @01:40PM (#39232459)
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.
Re:You Shouldn't Start with an SPA by pier25 on Saturday February 03, 2024 @09:45AM (#39240788)
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.

Re:You Shouldn't Start with an SPA by klysm on Tuesday February 06, 2024 @05:21PM (#39281605)
The routing strategy can have a significant impact on what latency the user sees.