I learned “pure” JS back in 2013, when HTML5 was brand new, and I still don’t get most of the stuff going on nowadays.

  • delirium@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Always confused when I see memes like this

    You learn js, then you learn a bit about ts and pick react/vue if you want to do frontend or nodejs if you’re into backend. Then you do something basic, like a barebones twitter clone, weather app, etc. By the point when you’re 80% done, you will know most important parts of the ecosystem naturally

    After that, learning all the supporting libraries/frameworks is super simple since next is just superset around react, same for nuxt. Solid, svelte, fresh etc are just different flavors of react. Even vue is looking like react this days with composition api, simply because they nailed the simplicity and dev comfort. Average dev will never face weird js/ts parts or confusing libraries because most of their day to day job will be moving buttons and looking how to persist user basket in browser storage…

    Sure there are a lot of libraries and ways to do stuff, but 90% of them are irrelevant, only-for-hobby or simply dead and unused since 2010. Knowing ts+(react|vue)+(vuex|redux-tk|mobx)+(styled|tailwind) will land someone a basic job where they can progress and expand their knowledge lol

    • gornius@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      1 year ago

      I tried to learn React, but it was unnatural for me, but then senior front dev at my workplace suggested Vue. I remember Vue’s options api being too weird to even try it.

      Then I discovered there’s composition api and fell in love with it. React’s flow without its weird quirks.

      I think Svelte is next step towards feeling as natural as possible.

      • delirium@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        All these things are solving different problems and you absolutely don’t have to use them if they complicate your current workflow.

        I can’t imagine making a high interval trading app, things like notion or figma without modern libraries.

        jQuery only gets you so far before you will wake up in unmaintainable hell where your team has to re-invent the wheel

        • I Cast Fist@programming.devOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          You don’t need any of that, not even jquery, to display static content, or even to make a decent commerce page (shopping, booking, tickets). I would wager the vast majority of the internet does not need to work like Figma or Notion (or old timey chatrooms, for that matter), with real time changes being sent to all connected sessions.

  • SavvyWolf@pawb.social
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I stepped out of webdev like 5 years ago. Now every time I try to get back into things to work on an open source project or whatever I just give up because I do not understand things.

    Everything seems to be based on React which is some kind of magic templating library that does everything? And also dynamically updates thing in response to changes and talks to the server?

    I much prefer the days of just using vanilla js to manipulate a DOM and talk to a well defined API.

    • gornius@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      The thing is, they look like too much for a simple app with near none interactive elements.

      But once app starts growing, concepts like reusable components, reactivity and state management become such an important tool.

      Imagine tracking shopping cart’s total value. With these frameworks it’s just one store containing total value, exposing the value as reactive state. Once the value changes, all components using directly or indirectly that value update immediately. In vanilla you would have to keep track of every instance where that value is used manually.

      Additionally, if you decide keeping total value of cart in frontend is stupid (because it is), you just modify your store to provide only readonly value, and create setters that require you to pass item or item id. Then that setter would hit up backend keeping your cart’s total value, add an item, and backend would return new total, which would now be set as that store’s new total value.

      These frameworks are kind of SOLID principles applied to chaotic world of user interfaces.

  • floofloof@lemmy.ca
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    1 year ago

    I work on a large code base that was built in .NET 4 with a lot of jQuery for the front end. We’re modernizing it, but it’s very slow work. A significant part of the work is improving the organization of scripts, of which there are thousands. We’re not even prioritizing getting rid of jQuery, because it works. To rewrite all the stuff that works, instead of focusing on structural matters, dependency management, maintainability and security, would be insane. (And that’s just the JS bits, on top of which there’s all the legacy .NET stuff to do.) We aim to get it into a state that will leave it working and maintainable in future without excessive effort.

    Sometimes I wonder who these people are who always promote this year’s library or framework, then next year promote something newer. Do they work in real companies with real applications under heavy use? Have they ever had to maintain a codebase that was written more than 6 months ago? Or do they just build proofs of concept and small apps and pontificate a lot, then move on to the next job before things get serious?

    • joel_anderson@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      I work on marketing websites which are essentially disposable. So every 3 years you start over from scratch (in a new version of some CMS). So I don’t get to build super cool functionality much, but I do get to work with newer tech stack. (I still don’t need 99.99% of the js frameworks flavors of the week)

      • floofloof@lemmy.ca
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        1 year ago

        That makes sense. If you’re pumping out websites it’s quite a different situation from developing large applications that need to run for many years. Same if you’re developing lots of little apps.

    • snowe@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      That second article is hilarious. It’s trying to point out that the first article is over complicating things then doing the same thing except the author thinks it’s not complicated what they’re saying when it’s actually insane.