• 0 Posts
  • 114 Comments
Joined 1 year ago
cake
Cake day: June 18th, 2023

help-circle

  • As long as “cleaner than you found it” also includes “better documented.” I’ve worked with people who think that “the code should speak for itself” to the point that they will make biased decisions with no explanation or documentation and then if you ask them about it after their response is “look at the PR for how that decision was made.” I’m not going to git blame and find your PR to find an outcome from an argument between two people that after scrolling just says “sometimes the API returns a JSON string here instead of nested JSON so we have this conditional” when that could be a comment













  • In many ways you’re correct, the “modern” js toolkit can be a nightmare. I work for a SaaS company that makes emergency management software. I’m pretty proud of our setup. It’s Vue 3, it’s incredibly optimized. We have tree shaking and code splitting, e.g. there’s hundreds of potential JS files you might load using our software, but they will only load when you need them, over a brotli compressed HTTP/2 connection so it really is efficient.

    With the amount of data we process through our API and how it’s presented to the client it would be a nightmare to not have Vue for state management and routing, axios for API calls, etc. But many SaaS products certainly aren’t optimized like ours


  • kautau@lemmy.worldtoLemmy Shitpost@lemmy.worldMany such cases
    link
    fedilink
    arrow-up
    37
    arrow-down
    1
    ·
    2 months ago

    Many of the things that jQuery made easy back in the day are now pretty easy with pure js (Ajax calls, improved selectors, programmatic DOM manipulation, etc), and browser support for most JS features is way more standardized.

    Granted, your pure JS is likely to be way more verbose to write, making it look more intimidating than jQuery.

    That being said. jQuery is performant in modern browsers, and when being delivered compressed and minified is tiny, so if you want to use it, go for it. Anybody who criticizes you or tells you “you should use [x]” for your online store or website is a JS elitist.

    jQuery is really only a “bad” choice for big interactive web apps, where frameworks that handle state and routing independently of the DOM are a much better choice.