i absolutely hate how the modern web just fails to load if one has javascript turned off. i, as a user, should be able to switch off javascript and have the site work exactly as it does with javascript turned on. it’s not a hard concept, people.
but you ask candidates to explain “graceful degradation” and they’ll sit and look at you with a blank stare.
As a web dev, I’ll say that yes, it is achievable. The problem isn’t what’s possible, but that we’ve trained new frontend devs in certain ways and given them certain tools. Those tools are being used in places they shouldn’t, and those same new frontend devs are failing to learn the fundamentals of HTTP and HTML.
React, for example, is a JavaScript framework that’s become incredibly popular in recent years. It’s meant for “single page applications”. I once made a control panel for a vacuum former with it, where you could turn on zones of heating and get the temperature updated in real time. You’re not expected to navigate away from that page while you’re using it. I think this is a good place to use React, though you could make the argument that it should be a native GUI app. (I’ll say that it isn’t that important; this thing runs fine on a Raspberry Pi 3, which is the target platform).
React is not a good option for an ecommerce site. You want to click on a product to check out its details. That means you’re going between very different views (pages) a lot. React increases complexity with no clear gain. An argument can be made for the address/payment/finalization steps. The money people like that because there’s a strong correlation between streamlining checkout and how often cash ends up in their hands.
A lot of those sites use React, anyway, for everything. Why? Because we’ve trained a bunch of new frontend devs so much on it that they have no idea how to make a site without React. This overspecialization has been detrimental.
I’m a full time React and React Native developer. Imo, the frustrations with react are when you server side render. React without SSR is much simpler. But you are 100% right about picking the technology that meets your project’s requirements.
However, let me play devils advocate. Why do you need to SSR your e-commerce site? To optimize your SEO? Seems to me that SEO lately is a lie we’re being sold to make it easier for LLMs to chew through the entire internet, including your SEO e-commerce site. Imo, search engines have stopped serving the consumer. If we forget the SEO component for a second, you could build a killer e-commerce site that uses React and deliver a great user experience. If this is all about SEO, then I’m sure there is lots of garbage we could inject into our projects that would boost SEO. We could add LLM written top 10 articles to a fake blog on our site that nobody actually wants to read, and boost our Google ranking.
It has nothing to do with SEO. We do server side rendering because it’s the simplest thing that works.
It’s simple when it’s all SSR or it’s all client side rendered (CSR). In my experience, mixing is when the headache sets in. There are benefits to SSR and CSR. You want a webpage that works without JavaScript, use SSR. You want a persistent video player that continues the current video as you navigate pages on your site, use CSR.