TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The Demise of the Mildly Dynamic Website

4 pointsby hlandauabout 3 years ago

20 comments

dissentabout 3 years ago
&gt; PHP has the world&#x27;s simplest deployment model for web applications: copy some files to a directory<p>And set up a webserver. Perhaps compile mod_php for Apache and configure it, taking care to do it securely. Then configure php too, again taking care to do it securely. Only then you can drop a bunch of files in a docroot and have PHP process them. And put some .htaccess files in so that things that aren&#x27;t supposed to be directly executed can&#x27;t be. I think it all just appeared simple, but it wasn&#x27;t. It was dumb luck and lowest common denominator configurations on shared hosting that made it appear easy.
评论 #31246939 未加载
评论 #31247439 未加载
评论 #31246948 未加载
评论 #31246830 未加载
评论 #31250158 未加载
评论 #31246912 未加载
评论 #31247496 未加载
dustedabout 3 years ago
That is such a well articulated observation, it resonates strongly with my own experience.<p>I grew up on PHP, it was the first thing beyond BASIC I ever wrote, and I wrote a lot and enjoyed it so much. It really was this magic thing, that you just modified whatever file you needed to modify, throw it on the server, and hit f5 to see your changes reflected.. No processes to restart, no state to be lost, you jammed, and it was a very gentle way to learn.
评论 #31245463 未加载
评论 #31248819 未加载
评论 #31247451 未加载
philihpabout 3 years ago
I can empathize with your lament that it used to be easy to spin up a quick website. It sounds to me like your experience as a software developer blocks you from willfully making mistakes we&#x27;ve all learned the hard way.<p>SSI still works, and you can turn it on with Nginx. It&#x27;s still quite limiting and fragile.<p>PHP still works, but as your project grows, unless you have equally experienced PHP developers, you&#x27;ll see things get out of hand quickly with scope issues.<p>CGI will still work, but similar to PHP, it&#x27;s a headache to setup the sandbox so a malicious or naive committer doesn&#x27;t clobber the environment. At least PHP&#x27;s defaults were pretty sane until someone does something cute and bypasses magic quotes and introduces some SQL injection.<p>Let&#x27;s give AWS Lambda some credit though, it&#x27;s virtualized and containerized CGI and can scale to handle loads that you&#x27;d think your backend was written in Elixir.
评论 #31245569 未加载
评论 #31247825 未加载
parastiabout 3 years ago
Frontpage, now that&#x27;s a word I haven&#x27;t heard in a long time. I used to make little pages with Frontpage and inspect the generated text to learn HTML.
评论 #31248655 未加载
评论 #31247253 未加载
blenderdtabout 3 years ago
I still build mildly dynamic websites in PHP once in a while. But this is only useful when it is a very small website (max 5 pages?) because you have to work with a directory structure to go without framework.<p>The moment your site gets a little bigger you need some kind of routing. This means you start redirecting all requests to one PHP file.<p>Then you start using forms and you need a database, a little framework for responses, and so on.<p>So you very quickly need a framework. This can of course be a very small framework.<p>The point is, small frameworks are so easy to setup you start skipping the &#x27;mildly dynamic website&#x27; part because it doesn&#x27;t scale at all.
评论 #31248063 未加载
vhodgesabout 3 years ago
You might be interested in <a href="https:&#x2F;&#x2F;stitcherd.vhodges.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;stitcherd.vhodges.dev&#x2F;</a> a side project of mine.<p>It&#x27;s pretty basic right now, but can already handle a number of use cases for injecting dynamic content into a mostly static site. (Essentially SSI using css selectors and DOM changes on the server side).<p>Alas I haven&#x27;t had much time to work on it lately, but I plan to use it for something at $DAYJOB so it will get some attention at some point.
1vuio0pswjnm7about 3 years ago
&quot;These are sometimes used to host full-blown web applications but I don&#x27;t see them being used to facilitate mildly dynamic functionality. mod_perl and mod_lua, for example, don&#x27;t really offer any kind of functionality allowing you to dip [in] and out of Perl&#x2F;Lua code inside HTML.&quot;<p>I want to understand this statement however I only use Lua with haproxy to achieve &quot;mildly dynamic&quot; pages. It is difficult for me to understand what exactly the author wants to do without an example.<p>Are there any good examples showing that the author is correct, i.e., that it is impossible to &quot;dip in and out&quot; of Lua inside HTML.<p>Certainly I recall projects that purported to offer Lua as a CGI-like interpreter, &quot;Lua Server Pages&quot;, or something similar. Have they not delivered on their promises.<p>For example, see<p><a href="http:&#x2F;&#x2F;keplerproject.github.io&#x2F;cgilua&#x2F;manual.html" rel="nofollow">http:&#x2F;&#x2F;keplerproject.github.io&#x2F;cgilua&#x2F;manual.html</a><p><a href="https:&#x2F;&#x2F;fuguhub.com&#x2F;LuaServerPages.lsp" rel="nofollow">https:&#x2F;&#x2F;fuguhub.com&#x2F;LuaServerPages.lsp</a><p><a href="http:&#x2F;&#x2F;barracudaserver.com&#x2F;Lua-Server-Pages.html" rel="nofollow">http:&#x2F;&#x2F;barracudaserver.com&#x2F;Lua-Server-Pages.html</a><p><a href="http:&#x2F;&#x2F;xupnpd.org&#x2F;luasp&#x2F;" rel="nofollow">http:&#x2F;&#x2F;xupnpd.org&#x2F;luasp&#x2F;</a><p><a href="https:&#x2F;&#x2F;redbean.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;redbean.dev&#x2F;</a>
评论 #31245751 未加载
评论 #31248599 未加载
评论 #31247098 未加载
moth-fuzzabout 3 years ago
Honestly this type of workflow is what I love(d) about rails. ERB is a nice enough templating language such that most trivial functionality is pretty much HTML, but dynamic content can be added in in a php-like way. Equally &#x27;jammable&#x27; is the server side code as well - Database is abstracted away, and all server side APIs and application code is all the same ol&#x27; Ruby. Django is similar with their own system for python, and equally easy to use. These web frameworks were exceedingly popular at one point, to the point where when node came along, along came express.js with it touted as &quot;rails for node&quot;. But aside from rails itself, and possibly django, and php in a more minimal sense, there really isn&#x27;t this kind of thing anymore? Why did we abandon it?<p>I guess the common criticism is &quot;it doesn&#x27;t scale&quot; but it seemed perfectly fine for me and my needs, and countless others, right up until every major rails project on github was &quot;last updated: 2014&quot;. Feels like the rug was pulled out from under our feet. An exodus without cause, an ark without a flood.
PaulHouleabout 3 years ago
I&#x27;d disagree about Lambda functions.<p>I wouldn&#x27;t use them for most things but I built an email mailing list manager that uses Lambda for several things such as bounce handling, subscribes, verification, unsubscribes, etc.<p>Sometimes I go (more than a few) months without looking at the system. Then I write a blog post that hits it big and get a few hundred sign ups in a few hours.<p>If I were trying to deploy the manager as part of a web site the calculations would be different, but as a stand-alone application I dread the thought of running the manager as a cloud instance or VPS. If I ran the system on a really adequate instance it would cost way too much to run. If I ran the machine on an instance I could afford, every six months or so the system would get a burst of traffic, go swap crazy (quit running AND possibly running up an extra $200 a month in EBS I&#x2F;O charges) and need maintenance to get it back up.<p>The API gateway for the Lambda function is almost Salesforce.com expensive on a per-request basis but it cheap when you consider the value of an email subscription and that I never have to think about the thing.
Putsabout 3 years ago
&gt; Or maybe they just stuck it out and edited every page manually when they wanted to change the header or footer.<p>We had a tool for this called frames!
评论 #31249361 未加载
xg15about 3 years ago
I&#x27;ve been wondering why the approach that many imageboards had to dynamic content didn&#x27;t catch on further.<p>Essentially, on those boards, HTML wouldn&#x27;t be rendered for each request but instead regenerated and stored on each update (POST request etc). The update script would generate a plain html file and store it in the www directory of a static web server, overwriting the previous version of that file. For GET requests, the server simply returned the current version of whatever file was requested.<p>This allowed the server to employ the full range of optimizations for static files (caching, partial content headers, etc) while still essentially serving dynamic content.<p>Of course, this kind of architecture makes only sense if updates are rare compared to GETs and if very little of the content depends on individual user identity. However e.g. for blogs or news sites, both conditions are usually given.<p>If there are small amounts of individualized content, this content could be pulled in via scripts.
评论 #31254315 未加载
评论 #31253388 未加载
matt_kantorabout 3 years ago
I&#x27;ve noticed this gap too, and started a (very alpha, experimental, and lately neglected) side project[0] that attempts to fit into this niche: a web server oriented explicitly towards &quot;mildly dynamic&quot; use cases. In its current form deployment&#x2F;updates are definitely not as easy as with shared PHP hosting (I have ideas for how to improve that eventually) and it probably won&#x27;t scale well to lots of traffic or lots of dynamism (e.g. it spins off separate processes to handle scripting&#x2F;computation, just like CGI does), but it&#x27;s been fun to work on and I think helps me cope with the ennui I feel whenever I&#x27;m faced with the modern &quot;best practice&quot; of &quot;let&#x27;s make everything a SPA&quot;.<p>[0]: <a href="https:&#x2F;&#x2F;github.com&#x2F;mkantor&#x2F;operator" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mkantor&#x2F;operator</a>
nicoburnsabout 3 years ago
I&#x27;ve been working on a &quot;mildly dynamic website&quot; using a modern stack: A simple Rust webserver (about 30 lines setup in the Axum framework) running in a trivial Docker image (just copies in the binary + static assets) hosted on fly.io (which is completely managed and free for up to 3 VMs).<p>It&#x27;s been great: I have all the flexibility of a dynamic template engine and a turing complete language running before that. But equally if I want to hardcode HTML then I can. And because it&#x27;s Rust its still wicked fast (I&#x27;m getting 50ms page loads including all assets) and resource usage is almost non-existent (it&#x27;s running on a VM with 256mb ram).
评论 #31247627 未加载
superkuhabout 3 years ago
Using server side includes support that your nginx&#x2F;apache&#x2F;etc webserver binary already has is another very small attack surface way to mild dynamism. I know it sounds 90s and stupid but it&#x27;s really very useful with no downsides.
winkabout 3 years ago
I&#x27;ve stumbled upon your website from linked articles from time to time and I really like the new layout. It&#x27;s kinda as bare-bones (in a good sense) as the old one but just that much nicer to read.
FerretFredabout 3 years ago
I really like the flexibility of Linux, PHP and .. bash scripts that run from cron and populate my SSI files :) My site is lightweight and I don&#x27;t use frameworks for PHP so load time is exceedingly quick. I take comfort in the fact that if power availability gets tough, I&#x27;ll be able to transfer the site to something like a Raspberry Pi.
softcactusabout 3 years ago
As someone fairly new to software, I was brought up on React, Node.js, Flask, Typescript, and AWS Lambda as my tech stack. Is there a definitive resource where I can learn about the older methods of web dev that are talked about in this article?
评论 #31248548 未加载
commandlinefanabout 3 years ago
&gt; the average modern web developer has no comprehension of what the web actually is<p>And suggesting that there&#x27;s anything wrong with this is &quot;gatekeeping&quot;.
lbjabout 3 years ago
I guess we don&#x27;t format our webpages anymore
评论 #31250760 未加载
seydorabout 3 years ago
There is nothing &quot;Dynamic&quot; about a website like imgur.com or twitter.com or reddit.com. They are megabytes of javascript heavy and are things you check every once in a while, not things that change before your eyes. I find twitter&#x27;s &#x27;new tweets&#x27; popups annoying and in any case i refresh the page because it s already too heavy from too much infinite-scrolling
评论 #31247484 未加载