News for hackers. Stuff that matters.
Re:The future of web software is HTML over WebSockets by jiriknesl on Friday February 26, 2021 @09:49AM (#26275290)
"UI state should live in the client." this is wrong and I think you have missed the point of the article.

In server-rendered app, there's nothing like UI state.

There's a request. This request and the database is enough to build response. There is no UI state. Your app can be (and often is) absolutely stateless and restult depends only on request and a state of the storage.

While when you have SPA, API & server, you lose the application state and it's not possible to store the whole app state in the client for many reasons (security, scalability, synchronisation...). So you have to store subset of it. And you have to build a machinery that will do all this synchronization so your states stay in sync. It's double the effort to get 5% improvement.

Re:The future of web software is HTML over WebSockets by pier25 on Friday February 26, 2021 @12:21PM (#26277200)
> In server-rendered app, there's nothing like UI state.

Of course there is.

For example, any state related to interactivity like forms, client-side validation, widgets, filters, etc.

Re:The future of web software is HTML over WebSockets by jiriknesl on Friday February 26, 2021 @03:19PM (#26279413)
All these things can be set up declaratively on the render time and managed through Ajax/socket. Local state is voluntary here.
Re:The future of web software is HTML over WebSockets by pier25 on Friday February 26, 2021 @08:57PM (#26281977)
So when using a drag-and-drop widget you're going to be waiting for server responses at every step of the way?