I just recently decided to go back in time and wrote a web app using Flask, all rendered server side, with a minimum of JS and JSON endpoints for a bit of client-side interactivity (e.g. autocompleting an input field). Very fast, iterative work. No duplication of data classes, no weird caching issues…
Felt like a breath of fresh air, sadly. Have we witnessed a full turn of the wheel?
But let's be honest: the frontend dev rat race had the effect to make the base web technologies better. Better CSS (variables, nesting, effects, media support, etc), better JS (webcomponents), useful libs available as wasm and so on... all good things that can be used natively and allow us to make better MPAs.
HTMX solves this, and it's mostly automatic. You get some nice transitions.
> How do you pass state between two pages?
You don't. You submit some data to the server, it generates HTML dynamically, you replace HTML on the frontend or redirect all together, you're done. The state is on the server.
Yes. You might call this an application, lol. You will require this no matter what, unless you have a fully client-side application. Like photoshop or something.
How so ? Vanilla JS has never been easier and more powerful.
> How do you pass state between two pages?
Why is it even considered to be a problem ? This is basic stuff. All web frameworks since the 90s have had this concept of sessions where you can store data that will be available across pages.
Sessions are a kind of global state. I mean temporary state, like when filling out a form and moving from one page to the other, but without submitting the results until the end.
Functions, classes, modules... everything is available to organize code. The mess some programmers make can be unstructured, but that's the case with any paradigm and yes, we've seen that with "modern" JS frameworks too. Spaghetti mess, lasagna mess, components mess or whatever pasta mess.
> I mean temporary state
What is the problem here ? It's as temporary as you need it to be.
Because the tooling has been here for decades and it works damn fine. No need to trash the frontend with ever changing piles of dependency and build nonsense.
when? View code in the back-end always looks like crap and never able to achieve the interactivity the front-end can. People wrestling with it was the reason SPA was born. There was no dictator forcing people to move on from such "awesome" working "damn fine" pipelines to modern front-end for no reason.
That's probably the fault of the people writing it. People can also write crap looking code using frameworks too.
> and never able to achieve the interactivity the front-end can.
That's what small sprinkles of javascript is for. You don't need incredibly beautiful interactivity in every pixel.