jQuery Is Seriously Underrated

13 points by rizs12 a day ago

The mainstream opinion seems to be that jQuery is outdated because vanilla JavaScript can work uniformally across virtually all modern browsers.

But I've been playing around with jQuery for the first time and wow - it's much more enjoyable to work with than vanilla JavaScript is.

Granted I don't work with JavaScript professionally (I use Java at work) so I might be overlooking jQuery cons that only become apparent in large professional codebases.

legitster a day 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 a day 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 a day 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 a day 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 a day 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 a day ago

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

    • carlosjobim 13 hours 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.

andrewfromx a day 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 a day 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 a day 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 19 hours ago

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