News for hackers. Stuff that matters.
Re:Building a web app with no framework by GordonS on Saturday March 05, 2022 @01:03PM (#30570038)
Another old'ish guy here, and I feel the same way.

I have done a few projects using Knockout and Angular, and I've used Svelte a little too. My conclusion is that SPAs definitely have their place - but that place is in the minority, mostly for web apps with complex UI/UX.

In SSR (Server-Side Rendered) projects (typically ASP.NET Core for me nowadays, but I've used others too), things are just so much simpler, with fewer moving parts. A sprinkling of JavaScript is all that's needed, and even then a lot is reusable between projects. And now IE has finally died, jQuery is no longer needed, and browser support for ES6 is good, even writing JavaScript is less miserable than it used to be.

Re:Building a web app with no framework by zdragnar on Saturday March 05, 2022 @02:47PM (#30571210)
Is it not simpler because the applications themselves are simpler? I mean, when you say that client frameworks like angular and svelte have their place with complex UX/UI interactions.

Of course SSR is simpler- request in, send / receive from a database, markup out. It isnt anything to do with SSR- your domain is simpler.

Re:Building a web app with no framework by yourabstraction on Saturday March 05, 2022 @09:00PM (#30574266)
> your domain is simpler

This echos my thinking whenever these framework/SSR/JavaScript debates come up. It's like everyone is talking past each other because there is no clarity around the complexity of what's being built.

Re:Building a web app with no framework by stepbeek on Sunday March 06, 2022 @04:59AM (#30576366)
I use miro and figma as examples of products that would be extremely hard to build as a traditional SSR app.
Re:Building a web app with no framework by naasking on Sunday March 06, 2022 @12:36AM (#30575300)
> your domain is simpler.

So you're saying the domain is simpler while still satisfying the client's requirements? I think that's exactly the OP's point.

Re:Building a web app with no framework by zdragnar on Sunday March 06, 2022 @09:59AM (#30577961)
OP said:

> My conclusion is that SPAs definitely have their place - but that place is in the minority, mostly for web apps with complex UI/UX.

Therefore, it follows that OP finds SSR is simpler, but only because OP only uses SSR for simple problems.

Re:Building a web app with no framework by naasking on Sunday March 06, 2022 @12:08PM (#30578996)
Non-complex UI/UX != Simple problems. Also, most problems people have don't need complex UI/UX.
Re:Building a web app with no framework by robertoandred on Saturday March 05, 2022 @03:47PM (#30571700)
Having to refresh the page every time you make a change or open a modal is a terrible user experience.
Re:Building a web app with no framework by sidlls on Saturday March 05, 2022 @03:55PM (#30571779)
Watching widgets/components freeze after an interaction because of a poorly-handled race condition in the JavaScript, dropped or mis-handled/scheduled async requests, and inconsistent cross-component state management isn't any better. It's arguably worse, because now the user has to guess as to whether something is wrong with the application or not and then refresh anyway.
Re:Building a web app with no framework by spoils19 on Saturday March 05, 2022 @08:57PM (#30574240)
Users don't really know what they want, and I'd wager that most are willing to accept a page refresh if they understood the immense productivity gains that developers like achieve, for a worse "user experience".
Re:Building a web app with no framework by orange8 on Sunday March 06, 2022 @12:58AM (#30575383)
> Users don't really know what they want

Users do not care about "immense developer productivity"

Re:Building a web app with no framework by Uristqwerty on Sunday March 06, 2022 @03:34PM (#30581001)
You can replace a chunk of innerHTML faster than a full page reload, using a near-trivial piece of vanilla JS.

But a full page reload also clears out memory "leaks", old state accidentally kept around in caches, clinging to DOM nodes discarded long ago, but themselves still referenced by an old copy of a data structure, etc. If you go for a SPA, or even something in between, suddenly being careful about your data structures becomes a major concern to long-term app use, carrying a whole new category of debugging.

Re:Building a web app with no framework by YuukiRey on Saturday March 05, 2022 @04:47PM (#30572236)
https://sr.ht/ is faster than most SPAs I know and it refreshes the page a lot
Re:Building a web app with no framework by gefhfffh on Sunday March 06, 2022 @03:56AM (#30576110)
It's not faster despite being in WiFi
Re:Building a web app with no framework by stepbeek on Sunday March 06, 2022 @04:58AM (#30576361)
This is a false-dichotomy/straw man. The conversation is about a javascript-heavy approach being overkill. I haven’t seen many arguing for noscript here.

Implementing a form that autosubmits and updates an element takes very little js.

Re:Building a web app with no framework by GordonS on Saturday March 05, 2022 @05:09PM (#30572436)
This is trivial with a sprinkling of JavaScript - our pages do update as required after form POSTs, for example.
Re:Building a web app with no framework by bingo-bongo on Saturday March 05, 2022 @04:25PM (#30572055)
What makes it a terrible user experience?
Re:Building a web app with no framework by hackerfromthefu on Saturday March 05, 2022 @08:35PM (#30574089)
Nonsense :)