Comment by romellem

4 years ago

These types of posts always miss a common reason why an SPA might be desirable in the real world: cross-company collaboration.

The assumption made in these posts is that you have total control over your entire application stack. Infra, Backend, Frontend, Ops, etc. In the real world, often times different companies are collaborating to build a final product for a client.

I worked at an agency that built an SPA because the frontend and backend were built by two separate companies at the same time. We’d meet to agree on what the APIs would look like and what shape to expect in the data payloads. Once we had some sample data, we could build a UI against that data.

When the real API was ready, we just switched the URL in the app config and everything started working.

If we didn’t build that as an SPA, we wouldn’t have been able to make the deadline the client was aiming for.

In a perfect world, would this have made sense to build as a MPA? Probably. But in the real world, you sometimes have to build things given some non-ideal constraints.