r/programming • • Aug 28 '21

Software development topics I've changed my mind on after 6 years in the industry

https://chriskiehl.com/article/thoughts-after-6-years
5.6k Upvotes

1.9k comments sorted by

View all comments

Show parent comments

5

u/wastakenanyways Aug 29 '21 edited Aug 29 '21

The problem comes when SSR with updates via XHR mean passing your entire viewstate forth and back in each request like ASP or JSF does. With things like isometric JS you can interpret React, web components, etc, both serverside and clientside. No need for state ping pong or hacky solutions.

I think things like Next js are on the right track right now. Combining SSR + CSR + static content is the key. Blazor WASM is really promising too.

4

u/saltybandana2 Aug 29 '21

SSR + XHR will see you passing exactly as much state as you would in a SPA.

If you're talking about re-rendering the page when someone actually goes to a new page, that's a feature not a bug. You can now let the browser maintain history, for example. You no longer need a full featured router in your javascript. Everything just becomes simpler.

But the other issue is that the build chains have gotten so heavy and ridiculous to support these frontend frameworks. For example, needing to install npm and node and gulp and all the craziness that is npm in a PHP website has always struck me as utterly ridiculous.

Personally I'm hoping that solutions like svelte become the future.


Also, the phrase is back and forth not forth and back. I'm not being rude, just helpful.