These days you can slap together a very capable PHP based Ecom solution using Livewire for those sections that need interactivity.
People really need to realise just how detremental to the user experience it is to have mountains of JS being needed just for an ecommerce site.
That about sums up everything wrong with our industry. Engagement over usefulness.
the point of an SPA is so that i can share code and data for different pages in the browser without having to get it from the server for each new page.
it does not at all prevent me from using links to the outside or even within the site. (i just built an SPA where all navigation is done via regular links, each view has a different url, they all can be bookmarked, and history works too so you can go back and forth using the standard browser buttons, and links to certain resources take you out of the app)
You still have to get it from the server for each new page, you just do it in the background.
It doesn't. Most users don't actually notice.
It was also the first SPA I made, in a career of decades. I also think I do not regularly use anything that benefits from being an SPA (I don't regularly use that diagram designer either).
Think data analysis tools, Intranet tools, e-commerce, and a host of B2B stuff?
I know, it all starts with a filterable list or a shopping basket, where page reloads or ajax "sprinkles" (regardless of what they're loading, HTML or JSON) are absolutely OK.
Especially the fully old-school approach with the page reloads - it can work and scale for simple and predictable requirements.
Until it doesn't - the first page with 5 interdependent autocomplete inputs takes weeks to develop and fix, the modals can't have routes without piles of jQuery hacks, and so on and ao forth
If a five input form takes week to fix, you have engineering problems beyond any choice of framework…
all the application and interface logic is in the browser. this is only possible thanks to SPA.
of course it is a tradeoff. if the user wanted to save their data outside the browser every few minutes then that would not be practical or if there is to much new data being generated so it doesn't fit into localstorage. i'd either need a server (even if running locally) that can save that data without user intervention or i should not use the browser as a development platform. in such cases a browser based SPA would have been the wrong choice. maybe electron, or a traditional desktop framework
It was fun to write. Relevant code is here:
https://github.com/ldyeax/jimm.horse/blob/master/j/j.php
https://github.com/ldyeax/jimm.horse/blob/cb6a1c03504cbe6b63...
I actually uncovered a niche bug across multiple browsers with this PHP code. In at least Firefox and Edge, if a page is cached with a fetch using accept:text/json, the response will be shown from view-source of the html page you have open, even if the content is different when you fetch the page with accept:text/html
The idea is the same code can work on front end and backend. On NextJS it will run your React on the backend but useEffects will not be called. Just the initial render is saved and piped to the browser.