In this context, it means static HTTP responses, but dynamic HTML/DOM.
I want a word to mean really static.
I'm in the core Phenomic team.
The idea in Phenomic is that we generate for each page:
- the HTML entry point, rendered like it would be with ReactDOMServer - the data-requirements of the page
That lets us offer the following: - Any page is accessible directly, without runtime (which has advantages regarding performance and SEO) - Navigation works even if JS is disabled - If JavaScript is enabled, the runtime just loads the minimum required data for the next page to display and renders it
Phenomic really is static, it just uses a few techniques that we learnt from the modern front-end development workflows and capabilities :)
But the React app can also start consuming all kinds of webservice.
This way (1) a large part of content can be served as prerendered static HTTP responses (HTML, CSS, JS). (2) Static content not initially loaded can be served as JSON (as seen in the presentation). And (3) dynamic content (e.g. real time comments or a chat) can be non-static (one or more webservices, possibly on WebSocket thereby going beyond HTTP).
I think this may be very interesting when "big mostly static content", "need for modern web tech" and "big traffic" meet.
I can see good benefits of having a way to do static site generation with the React ecosystem if you're already familiar with it.
If the website is simple, you could use iframes for headers and footers.
<!--#include virtual="../snippet.html" -->
Most servers that you would get for a shared host (ie Apache, NGINX) support this.First, you have a need. Then you get a crippled native "solution", that emerges from some committee and therefore doesn't really solve anything. In lieu of alternatives, a lot of people use it anyway. Then the problem is ignored long enough so other people come up with hacks to solve the same problem slightly less bad. Then the problem is ignored semi-permanently because 'hey, you can just use one of those hacks!'. (Look up iframe seamless attribute.)
The workflow and output remains largely unchanged, but something like Jekyll would probably make the resulting codebase a little cleaner.
Otherwise, I completely agree. There are better tools for building static sites.
You could at least use server side includes (SSI) to include those snippets.
Static website generators like Jekyll are pretty cool, though. You should definitely check them out.
I added a game of life mostly to prove the extensibility covered the screen modes.
You copy/paste code? This is crazy.
Throwing together a small static website with a few pages, in my experience, is one of those situations.
Wait, are we really talking about a static website?
I'm a big fan of React and all the JS ecosystem, but when I need a static website, I just make my bunch of html files (and I copy/paste the same header/footer on each), my css file, eventually 2 lines of JS directly in a <script> tag to toggle a menu on mobile devices, I upload it on S3/CloudFront and that's it.