3 ms·
This is impressive and would work really well in a lot of sites, especially ones with static content. However it misses two important reasons to use a single-p
by sambeau 6y ago
This is impressive and would work really well in a lot of sites, especially ones with static content.
However it misses two important reasons to use a single-page app:
1. SPAs allow for highly interactive interfaces with custom components, drag & drop, audio etc.
2. SPAs can cache UI state in the client. The alternative is to store it in a server side session specific to each client. This is possible, of course, but it will either be lost every time the server is restarted, or it will need to stored in the database. Sending UI state back and forth to the database is another increase in load on the database and network.
There is also the more general point about SPAs exchanging less data with the server so putting less stress on the network but that is touched upon in the post.
- brailsafe 6y agoRegarding point #1, is there anything inherent to the single page application that makes something more interactive? I think this article touched on an alternative to the one factor of routing being necessary to eliminate transitions, but otherwise you still have the same interactive capabilities within a page.
- Scarbutt 6y ago2. SPAs can cache UI state in the client. The alternative is to store it in a server side session specific to each client. Non-SPA doesn't mean 0% JS.
- pier25 6y ago> SPAs allow for highly interactive interfaces with custom components, drag & drop, audio etc. None of the features you listed require an SPA. Other than page transitions you can have any UI sophistication on an MPA. > This is possible, of course, but it will either be lost every time the server is restarted, or it will need to stored in the database. Which is why there are caching databases like Redis to solve this.
- maxthegeek1 6y agoServerside caching with e.g. doesn't help with network latency.
- pier25 6y agoIt does when the server has to communicate with distant services/databases. Also an SPA doesn't alleviate network latency either between the browser and the API.