jQuery Is Seriously Underrated

16 points | by rizs12 2 days ago ago

14 comments

  • legitster 2 days ago ago

    > jQuery is used by 93.4% of all the websites whose JavaScript library we know.

    https://w3techs.com/technologies/details/js-jquery

    Maybe jQuery is seen as outdated in the backend world, but I can assure you that in the webdev world jQuery and Javascript are almost entirely synonymous.

    Someone might try to say that hammers are outdated in a world where a nailgun exists, but I can assure you the hardware store sells a lot more hammers than they do nailguns. (In this analogy jQuery would be a hammer and vanilla javascript would be pounding in nails with a big dumb rock).

    • rizs12 2 days ago ago

      Thanks for this. As I said - I am not a front-end professional. I'm just a nerd who plays around with technology.

    • seattle_spring 2 days ago ago

      > I can assure you that in the webdev world jQuery and Javascript are almost entirely synonymous

      Frontend engineer here, and I very much disagree with that sentiment. I'd also love to see what percent of the internet uses jQuery purely on the basis of traffic. There are probably a hundred million generated recipe blogspam pages that use jQuery and get 5 hits per month each, versus companies like Booking, Airbnb, Facebook, Google, etc, that get magnitudes higher amount of traffic. I'd also be curious what percentage of frontend roles are looking for someone proficient in jQuery versus other frameworks. Again, I would bet it to actually be a minority with lower salaries and companies that view their engineers as purely a cost center.

      Not going to get into what role I think jQuery should play in pages and apps developed today more broadly, as I've seen that discussion hashed out a million times on HN and it never is productive.

      • legitster 2 days ago ago

        jQuery is literally a requirement for Bootstrap. Most of Google's services use it implicitly.

        I agree that it's largely superfluous on webapps, but I would bet a crisp $20 bill that somewhere Airbnb is running a CMS-based site somewhere that loads jQuery.

        I will rely on my nailgun v. hammer analogy for this again. I understand that the big scalable web experiences are built using nailguns. But for any sort of small web project that requires just a couple of dozen lines of code, jQuery is still very much implied.

        • streptomycin 2 days ago ago

          Bootstrap no longer requires jQuery, as of v5 from 2021. Even before then, there were popular ports of the Bootstrap JS to various other frontend frameworks such as React.

        • seattle_spring 2 days ago ago

          What Google services use Bootstrap? Why would they, given Google's component library is Material and their JS lib is Angular?

      • carlosjobim a day ago ago

        You're comparing combustion engines to nuclear power plants. Most vehicles will have combustion engines, even though a lot of energy is generated with nuclear technology.

        > I'd also be curious what percentage of frontend roles are looking for someone proficient in jQuery versus other frameworks.

        If they are using jQuery they don't need to hire a frontend engineer, because their problems are solved.

        • seattle_spring 5 hours ago ago

          > If they are using jQuery they don't need to hire a frontend engineer, because their problems are solved.

          If their site requires minimal interactivity and will never scale to a point where more than 2 or 3 people work on it, then yeah absolutely.

  • sandreas 9 hours ago ago

    In the old days (TM) jquery made things easy and cross platform (all browsers). It could literally take any parameter (string, array, function, ...) and mostly did magically what the dev expected. It is very intuitive and productive. For small(ish) things this is great and saves time and money.

    However, this came at a cost: performance

    Usually user experience is more important than developer experience at a certain breakpoint. As long as everything feels snappy, jquery is OK, but as soons as the APP starts getting slower, you just can't get along.

    I'm not saying jQuery is slow in General but some things are (Dom, eventhandling) slower than native stuff and this sums up. Not to talk about highly optimized "Compile time" libs like svelte.

  • andrewfromx 2 days ago ago

    Modern frontend frameworks like React, Vue, and Angular provide their own state management and DOM manipulation approaches that are more efficient than jQuery's direct DOM manipulation

    • dtagames 2 days ago ago

      And web components (with Lit) give you the shadow DOM and total control over how you program and use HTML elements.

      jQuery is code smell today. The most popular use case, directly touching a DOM element is built into JS now (querySelector) and you really don't want to be doing that anyway.

  • dlcarrier 2 days ago ago

    At one point, jQuery was so overrated that when I searched Google for JavaScript alert syntax, it came up with a similar StackOverflow question, where the top answer used jQuery to call it.

    There were other responses to the StackOverflow question, which managed to call an alert with just the single method call, but the top answer loaded in the entire jQuery library, to place a single native call.

  • codegeek a day ago ago

    jQuery is the WordPress of Javascript. It will never go away no matter what anyone says.

    • CM30 10 hours ago ago

      JQuery is also heavily associated with WordPress nowadays, since that CMS calls it by default. Makes me wonder what the stats would be like should WordPress ever stop using jQuery altogether...