News for hackers. Stuff that matters.
Re:Get Static by divan on Sunday March 22, 2020 @09:06PM (#22660358)
I feel like few people even know about static site generators, and use general purpose solutions what anything that includes word "site" in it, whether it's dynamic social portal or single page static content.

Like, from the practical perspective, if you have a blog with content that is requested 1000 times per minute, but updates once per month (23 microtimes per minute), why on earth would you setup a database (with geo-redundant replica, of course) and run overly complex code to render the same HTML over and over every single time it's requested? The only possible answer here is being oblivious of other available options, and I believe author of the post is trying to raise awareness that there is another option.

Re:Get Static by ricardobeat on Sunday March 22, 2020 @09:11PM (#22660378)
Most websites are more dynamic than they look. Anything with frequent updates (news for example), user accounts, any kind of personalization / geo-based content, or running A/B testing will demand dynamic rendering.

That's not an excuse for terrible performance either way. At this point it's trivial to handle hundreds (or thousands) of req/s on common hardware if you just choose the right software to run.

Re:Get Static by tacon on Sunday March 22, 2020 @09:26PM (#22660434)
The JAMstack pitch is to sprinkle a bit of JavaScript on a mainly static site to achieve personalization, geo-based content, etc. A recent intro video shows exactly how to do that with news displayed based on browser language settings, etc.[0] It is a bit more complicated than a plain static site, but with recent tooling, not much more complicated.

[0] https://www.youtube.com/watch?v=A_l0qrPUJds

Re:Get Static by PKop on Sunday March 22, 2020 @11:19PM (#22660962)
even then it's only a question of how long can "stale" data be served, or is the dynamic-ness worth it?

You can you lamba/cloud functions as webhooks for your CMS to ping when a rebuild of the static site is necessary. Netlify helps you set this up easily.

Even if you updated a dozen times a day, it would take only a few minutes or less to rebuild and deploy.

edit: yes per-user data is a primary use case for dynamically rendered sites.

But public pages that all users load make sense as static if possible

Re:Get Static by ricardobeat on Monday March 23, 2020 @05:24PM (#22668929)
Not dozens, think millions/billions of combinations for dynamic content. You cannot pre-render all the possibilities.
Re:Get Static by krebs_liebhaber on Monday March 23, 2020 @12:15AM (#22661215)
> why on earth would you ... render the same HTML over and over every single time it's requested?

That's what caching is for.