JackJones's avatar

When does it make sense to move to a SPA?

Hi All,

I'm finding more and more as my application progresses that every page is basically a Vue component. It's a simplified MRP system with a lot of logic done in Laravel, but all of the forms etc are Vue components.

Is there a point when it just makes sense to use a SPA?

I've been reading about it on Google but I'm relatively new to all this stuff and don't know if I'd be making the right decision by using a SPA.

I basically have just as many API routes as regular ones, and most pages have their own dedicated component, which a SPA would get rid of.

Has anyone got any experience in this area who could give me some advice?

0 likes
6 replies
MohamedTammam's avatar

If there's no a lot of front-end interactively, I would consider Livewire.

jlrdw's avatar

It's total preference. I would never consider an SPA, but just my preference.

Side note, many folks that think they need an API probably don't. A regular web app would be better.

Ben Taylor's avatar

I used to make SPAs, but now that Inertia exists, I'd pick that over SPAs every time.

Snapey's avatar

Create an SPA when someone (ie, your boss) says it must be so.

I'd never choose one for myself.

Talinon's avatar

One non-negotiable use case for an SPA would be offline mode. If you ever see yourself requiring users to continue to use your application without an internet connection, you'll almost certainly need an SPA.

For example, in my case, we have users working on remote job sites, far away from any reliable network/wifi, or there may be situations where airplane mode is required (nuclear facilities). They still need to be able to record data and upload/sync it later to the API using offline mode and service workers. Livewire isn't going to help with that.

Please or to participate in this conversation.