Live data from Hacker News

The demise of the mildly dynamic website (2022)

devever.net

161–170 of 183 posts

Re: The demise of the mildly dynamic website (2022)

#162

Earlier quoted context omitted.

>and decided to switch to static HTML sites on S3 it's really hard to overstate how great s3 sites are with cloudfront in front of them. mine costs me the added complexity for any level of dynamic-ness is really just not worth it, unless i'm going to go to the trouble of making a full-on app that needs a revenue model.

CloudFlare Pages are another great product for zero maintenance static sites, and they can be made mildly (or heavily, if you want) dynamic with CloudFlare Workers.

Second Cloudflare. And it's super easy to hook up to domains registered via Cloudflare too.

Re: The demise of the mildly dynamic website (2022)

#163
post #19
post #14

I think the spirit of this article is correct, although some of the digs at modern web tech and SPAs seem to be beside the point. I used to have a "mildly dynamic website." It was a $5 digital ocean box. It ran nginx with php-fpm, mostly so it could have a Wordpress install in a subdirectory, and it had a unicorn setup for an experimental Rails app somewhere in there. Given that environment, the "mildly dynamic websi…

And then you forgot to add "I had to stick it behind cloudflare because someone decided to DDOS it and send me 500GB/s traffic for no apparent reason at all. The early web was the wild west. The modern web has turned into small fry trying to hide in the shadows of megalodons so they don't get ate by a goliath.

You don't have to go as far as DDOS.

Blogpost mentions comment section, like it something you can "just do" - no one wants to do comment sections in 2024 on their own. Amount of crap one will get in case they start to have mildly popular post is insane.

Re: The demise of the mildly dynamic website (2022)

#164

Earlier quoted context omitted.

> They aren't equivalent at all. The web server is hosted on an OS and both require ongoing maintenance. From a technical standpoint, surely the servers running Lambda have an OS and require maintenance internally by Amazon at some level (even if it's dev-ops-abstracted away for their operators). It's just their responsibility instead of yours, and it's also their responsibility to find other work for those servers w…

And, of course, they don't just "bear the cost of an idle server". Just like any other fixed costs in any other industry, those costs get smeared over the charged prices. Unless there is some serious economy of scale (i.e. ops at Amazon managing to handle the upkeep of a 1000 of their servers for less than 1/1000 it costs you to manage 1 of your server), you're ending up paying somewhat more. But then again, you don'…

>> somewhat

It's a factor of 5 to 20 [1] in many cases.

Regular hosting is unbelievably cheap, especially in high traffic environments.

[1] https://tech.ahrefs.com/how-ahrefs-saved-us-400m-in-3-years-...

Re: The demise of the mildly dynamic website (2022)

#165
post #100

Earlier quoted context omitted.

I would try some "old style" php frameworks. Like CodeIgniter or Yii. If you want even simpler, then maybe try Slim framework. You'll have to add your own data access lib. If you want Grug brain PHP then there's https://github.com/bcosca/fatfree You can also use composer package manager to build your framework with libs like routing, sql query builder, etc.

> Fast and clean template engine Is PHP not already a template language? The whole idea of PHP frameworks always confused me. Why do I need a router when I can simply add new files at the routes I want?

You're right, it is.

The advantage of a router is basically: please always execute this code (auth, db connection, logging, session, rate limiting, csrf protection) before running the actual code for pages that will be rendered.

Or you could also just keep using normal page.php files and possibly include a boot.php at the top of the pages to achieve the same. But then you don't get pretty URLs unless you're doing some server URL rewriting.

Come to think of it, routers require URL rewriting too.

Re: The demise of the mildly dynamic website (2022)

#166
post #89

Earlier quoted context omitted.

NearlyFreeSpeech.NET is good for this. Their main tier - "production" sites - are very inexpensive and the admins take care of OS and server-software updates. They have another tier - "non-production" sites - that are even cheaper and can be perfectly sufficient for a personal homepage. The admins maintain these servers as well but they might do beta testing on them. The environment is fully hackable and has PHP, SSH…

And even more obscure languages like Forth and Octave. The only thing to watch out for is that they run FreeBSD (instead of a more "normal" distribution) so if you're used to Linux-as-seen-on-Debian-or-Ubuntu there are a few things that are different (but so cozy).

For what it's worth, FreeBSD is actually it's own thing and not Linux at all. It's descended from Berkeley Unix and has no code in common with Linux or GNU (though it can still run software that's cross-compatible).

Re: The demise of the mildly dynamic website (2022)

#167

Earlier quoted context omitted.

Years ago a Digital Ocean virtual server of mine stopped working because I had never upgraded Ubuntu to the newest major version. After a few years, the version of Ubuntu was no longer supported by the Digital Ocean hypervisor and couldn't mount or boot at all. In my experience, yes you absolutely need maintenance. In the past I've had to upgrade from HTTP to HTTPS, upgrade the OS, upgrade to newer versions of extern…

These are all problems that shouldn’t exist. You have succinctly described the problems with modern IT. Software doesn’t need to have an expiration date. It doesn’t decay or expire. But because of our endless need to change things, rather than just fix bugs, we end up with this precarious tower of cards. If, as an industry, we focussed on correctness and reliability over features, a lot of these problems would disapp…

But the hardware does expire. Computers aren't just magically "faster" than they were decades ago; they're altogether different under the hood. An immense number of abstractions have held up the image of stability but the reality is that systems with hundreds of cores, deep and wide caches, massively parallel SSDs and NICs, etc. require specialized software compared to their much simpler predecessors to be used effectively. Feature bloat is a major annoyance, and running the old software on new hardware can give the appearance of being much faster, until it locks everything up, or takes forever to download a file, or can't share access to a resource, or thinks it has run out of RAM, or chews up a whole CPU core doing nothing, etc.

Re: The demise of the mildly dynamic website (2022)

#168
post #158

Earlier quoted context omitted.

That sounds like an AWS thing? There's a lot of frameworks that can deploy straight to Vercel, Cloudflare Pages, Netlify, etc. without all that. And if you really want to manage all that, it would apply to both PHP sites and JS and anything else. That's really more of a discussion of fully vs partially managed cloud solutions, not PHP or JS or any framework in particular.

> There's a lot of frameworks that can deploy straight to Vercel, Cloudflare Pages, Netlify, etc. without all that. All of them need all that. And those frameworks are for a reason: they sweep a lot of these things under a rug, and after a certain complexity you will have a vendor lock-in. Just because you will end up depending on certain policies that other vendors don't provide. Or on certain services that other ve…

Can you provide some examples? This hasn't been my experience, as a web dev who switched from PHP to such frameworks.

There's so much less complexity and maintenance overall, IMHO, but maybe we're looking at different facets of it?

Re: The demise of the mildly dynamic website (2022)

#169
post #89

Earlier quoted context omitted.

And even more obscure languages like Forth and Octave. The only thing to watch out for is that they run FreeBSD (instead of a more "normal" distribution) so if you're used to Linux-as-seen-on-Debian-or-Ubuntu there are a few things that are different (but so cozy).

For what it's worth, FreeBSD is actually it's own thing and not Linux at all. It's descended from Berkeley Unix and has no code in common with Linux or GNU (though it can still run software that's cross-compatible).

Correct - but if you're normally interacting with Linux boxes on the command line you're probably not going to be too far from home since the _programs_ behave mostly-the-same.

Re: The demise of the mildly dynamic website (2022)

#170
post #14

I think the spirit of this article is correct, although some of the digs at modern web tech and SPAs seem to be beside the point. I used to have a "mildly dynamic website." It was a $5 digital ocean box. It ran nginx with php-fpm, mostly so it could have a Wordpress install in a subdirectory, and it had a unicorn setup for an experimental Rails app somewhere in there. Given that environment, the "mildly dynamic websi…

I tried S3 for my static HTML site but the problem is my personal website gets infrequent visitors and for each visit the first load is always slow probably because my website gets moved from memory to disk. The thing is, my website is less than 20KB and I don't like it to be slow for all the users just because it is infrequent. Managing my own server allows me to lock my website into memory.
Post reply on HN