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.

  • Jimmycrackcrack@lemmy.ml
    link
    fedilink
    English
    arrow-up
    27
    ·
    10 days ago

    I don’t know anything about web development but, is it really fair to say it should work exactly the same with JavaScript turned off? If that were achievable why would it be there in the first place? I assume the graceful degradation concept is supposed to be that as you strip away more and more layers of additional functionality, the core functions remain or at least some kind of explanation is given to the user why things don’t work.

    • Frezik@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      2
      ·
      9 days ago

      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.

    • ElectricMachman@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      1
      ·
      9 days ago

      People do stuff in JavaScript that you really don’t need JavaScript for. You don’t need JS to display a store listing, for instance. Or a news page, or documentation, or even a search engine

      • Jimmycrackcrack@lemmy.ml
        link
        fedilink
        English
        arrow-up
        1
        ·
        9 days ago

        Ok, I’m seeing this a lot and I get it, and despite my lack of expertise in the field I can sympathize with the sentiment. Perhaps those replies are answering more in the spirit of the post than the letter.

        It’s just that the title asked if no one knew what this ‘graceful degradation’ concept was anymore and the text used the example specifically that the page should be exactly the same with or without JavaScript switched on which, without trying to be facetious, sounded kind of logically impossible.