3 ms·
The space between SPA's and MPA's
I have been writing my latest webapps in a way that somewhat sits between Single page, and Multi page architecture.
Like a SPA, the page is rendered client side, using a client side MVC pattern:
- First a loader HTML is pulled from the server. This has a simple rotating Wait gif, and links to a 'Front Controller' loader.js.
- The loader decides which actual controller to use, inserts this as an external script into the head of the dom.
- This controller then loads the Data (Model) and Template (View) to render. If both are successful, the controller renders it and replaces what is in <BODY>. If unable to fetch the data, an error is instead rendered, inserted into body.
Like a MPA, every page has a URL, the user navigates the web application like any other MPA, back button works as default, page navigation always loads afresh which means any memory leaks that might exist in the code, do not become an issue (not to say they shouldn't be fixed, but they just are not a problem as memory reset on every page load)
I kind of named it Brempa - Browser Rendered Multi Page App. - I linked to a demo of an app I made....hosted on an orange pi, please be kind to it!...
http://home.totspics.com/BReMPA/loader.html
Comments / criticism? Thanks.
- brudgers 10y agoClickable: http://home.totspics.com/BReMPA/loader.html http://home.totspics.com/BReMPA/loader.html A web page with some diagrams would probably provide me with a better understanding of what you have built. A code repository might help too. Keep in mind that people are coming to your project without having worked on it and thought about it. So things that seem obvious or self explanatory or requiring minimal explanation probably are not that way for other people. Good luck.
- tonywestonuk 10y agoThanks, I'll put something together.,
- brudgers 10y agoA few other things: 1. If it meets the guidelines, this might make a good 'Show HN'. Show HN guidelines: https://news.ycombinator.com/showhn.html https://news.ycombinator.com/showhn.html 2. Having a landing page is a possibility...github pages is convenient if you're on github.