News for hackers. Stuff that matters.
Re:I still love PHP and JavaScript by jeroenhd on Wednesday August 03, 2022 @03:56AM (#32328859)
CGI has become "serverless" and it's hyped up to no end. The more things change, the more they stay the same.
Re:I still love PHP and JavaScript by larve on Wednesday August 03, 2022 @09:27AM (#32331414)
Thanks for the comment!

I think the "the more things change, the more they stay the same" is a great thing, and something to very much be aware of and study. The move back and forth from backend state to frontend state to slim apps to fat apps has been going on since the 60ies, and is driven by ultimately hardware and networking costs.

The underlying patterns are all fairly well understood, which means that knowing both approaches and being aware that things are going to slosh back and forth heavily simplify long term design.

I haven't written these thoughts out, but in many ways the codebase (as in, how your files are organized) is largely independent of how your code is actually deployed and where it runs. If you are aware that some business logic might one day run in the frontend on the client device, and 4 years later might make more sense ot run in a lambda, that's something you can architect for.

Serverless / stateless is ultimately "functional programming". If you write your code as a side-effect free function, leveraging technologies like WASM, you can keep the same code, and deploy it frontend or backend or both or as a lambda or as a single node worker, and the code itself won't change. These are the things that next.js and vercel and edge computation leverage, but it is true in every codebase (embedded, desktop applications, etc...).

Re:I still love PHP and JavaScript by NateEag on Wednesday August 03, 2022 @10:36AM (#32332307)
With the crucial difference that "serverless" is proprietary and uses different APIs, so you can't just go to whatever hosting company you want.
Re:I still love PHP and JavaScript by jeroenhd on Wednesday August 03, 2022 @11:51AM (#32333352)
Of course, vendor lock-in is a feature because once developers leave a company, someone else with the necessary proprietary knowledge needs to replace you. Spread proprietary cloud stuff like the plague and you'll always be employable somewhere!
Re:I still love PHP and JavaScript by hestefisk on Wednesday August 03, 2022 @08:45AM (#32330948)
use CGI; use strict;