Is there a canonical definition of SPA which would exclude the software architecture model described below?
I'm working on an app with a new web-architecture model (new to me, at any rate) which has features that differentiate it from a Single Page Application (SPA) as the term is conventionally understood.
Since the model uses server-side and client-side variables which always automatically mirror each other, I would like, at least provisionally, to give the model a label something like Reflective SPA (or veSPA for short) but I'm concerned that due to its reliance on server-side processes, it may not qualify as an SPA at all and, as such, this name would be misleading and/or nonsensical.
Towards the end of the Wikipedia entry on Single Page Applications there is a statement:
A SPA is fully loaded in the initial page load and then page regions are replaced or updated with new page fragments loaded from the server on demand. To avoid excessive downloading of unused features, a SPA will often progressively download more features as they become required, either small fragments of the page, or complete screen modules.
I'd strongly subscribe to this as a conventional definition of an SPA. This is absolutely what I think of when I read the acronym SPA.
What differentiates veSPA is that instead of:
page regions are replaced or updated with new page fragments loaded from the server on demand
veSPA repeatedly responds to user interactions by updating the queryString
, either via:
1. Updating the URL (including the queryString
), using:
window.history.pushState({}, document.title, 'https://example.com/' + queryString);
(Javascript)
2. Reloading the URL (using a new queryString
), using:
window.location.href = 'https://example.com/?' + queryString;
(Javascript)
3. Redirecting the URL Request (using a new queryString
) at server level, using:
header('Location: https://example.com/'.$Query_String);
(PHP)
When the page is actually reloaded, various custom-data attributes in the root HTML element are populated from the queryString
, using the super global variable $_GET
in PHP.
When the URL queryString
is updated, the same custom-data attributes in the root HTML element are populated from the queryString
, using new URLSearchParams(window.location.search)
in Javascript.
Either way - and this is the most important culmination of everything described above - the app-view is then rendered via CSS from the values in the custom-data attributes in the root HTML element.
Does this repeated use of page-reloads and server-side PHP (described above) mean this model is too differentiated from SPA (as conventionally understood) to have the term SPA meaningfully applied to it (or to use SPA in its name)?
Is there a canonical definition of SPA which would exclude the model described above?
<center>
is still "a kind of HTML5", or a website with a.webmanifest
but no Service Worker is still "a kind of PWA" but neither of these statements would be true.<center>
in HTML5) doesn't mean that everyone therefore agrees to draw it in the same place. So like your<center
example, we can assert that some line exists on SPAs (it's in the name, i.e. it must be an application accessible through a single webpage), but whether that focuses on user experience, technical implementation, or general architectural approach is up for debate and not universally answerable. Real life consistently teaches developers that semantics are much more vague than logic would want it to be.