4 ms·
> The important technical difference between MPAs and SPAs is where they put that complexity. Just as important a practical difference (an outworking of the co
by chrismorgan 5y ago
> The important technical difference between MPAs and SPAs is where they put that complexity.
Just as important a practical difference (an outworking of the complexity location) is the matter of statefulness.
With an MPA, each page load is its own thing, generated from scratch from the canonical data source each time. Pages are essentially stateless.
With an SPA, the client will generally be interested in retaining data and caching things for at least the duration of the session, and it’s easy for state to get out of sync. That can go wrong so many ways, and cause so much pain, and resolving that commonly takes reloading the whole page, which is normally distinctly slower than it would have been in the MPA world. (Not that it need be noticeably slower, but it almost always will be.) Or the absolute worst case, persisted wrong data… that’s a nightmare.