4 ms·
The contention between these two schools of thought seems to elude to a bigger problem that right now both options kinda suck. The old old school mode of servi
by Spivak 7y ago
The contention between these two schools of thought seems to elude to a bigger problem that right now both options kinda suck.
The old old school mode of serving static HTML pages is totally fine. I have basically no issue with it. You can't do very much but if your site is a series of interlinked but self-contained documents then it's the gold standard. Once you start having a lot of dynamic content there's a lot of waste since each page is it's own little application.
The 'classic' model of multi-page web design which boils down to templating HTML pages is awful. Truly ungodly awful. I don't care how many layers of DSL you pile on top of it to make it feel less like you're building an application with C preprocessor macros it doesn't make it any better or less brittle.
The SPA model is "more correct" way to do dynamic content since we're back to serving static pages but still ends up terrible since now every single page has emulate browser semantics poorly and deal with the nightmare that is using the browser as a rendering target.
There's got to be some middle ground. I want the browser to be my application router. Give be a site-global place to stick my JS send me an event with what page I need to render.
- majewsky 7y ago> The SPA model is "more correct" way to do dynamic content since we're back to serving static pages The contention is that we cannot even agree on basic words. An SPA is anything but "static", it's as dynamic as a website can ever be with all the untrusted JavaScript code that my browser has to execute (hence why browsers are as complex as they are today). A server-side application serving static HTML and CSS ("static" as in "no JS") is much easier to trust.
- Spivak 7y agoWhen I say static I mean that your web server distributes a fixed artifact without any server-side templating. Your usage of 'static' conflicts with the usage of 'static site generator' where fixed payloads are generated that can be uploaded to any web server. Such sites can have no JS, be full blown SPAs, or anywhere in between. Some people use "static content" for this but often sites serving static content are still enhanced by JS in some form. Just that the main page content doesn't have any interactivity.