Is jQuery still relevant?

jQuery is present on 96.4% of all sites using JavaScript. Modern frameworks such Angular, React and Vue appear to receive more attention yet are barely able to scrape 1% of usage combined.

There are a number of possible reasons:

  1. Many millions of legacy sites dominate these figure, and/or
  2. Despite the hype, the vast majority of developers still find jQuery the best or easiest option.

What do you think? Is jQuery still relevant? Do you continue to use it? Are modern frameworks superseded too often? Is the learning curve too steep?



8 comments

Robert Greyling
12/15/2016 10:22:49 AM
Personally, I still see a lot of jQuery around - even in non-legacy projects. For a lot of devs, sometimes just including a script tag and using $... is a lot easier than spinning up a framework to handle proper view logic, binding and DOM manipulation. I also think Bootstrap has a lot to do with jQuery being around, as pretty much every project I've seen Bootstrap in, there's jQuery pulled in as an automatic dependency - probably because it's just "easier". Obviously, you still have every legacy project out there, and let's not kid ourselves, jQuery solved a hell of a lot of problems when it came around, and really was the hammer we took to everything that looked like a nail. I still find it incredibly easy to work with - when I work on older code bases and I see jQuery, I don't shy away from it, it's normally going to be something that's easy to debug and fix or expand on for the customer needs, and so will likely still live out a number of years on their servers.

Craig Buckler
12/15/2016 11:08:16 AM
@RobertTheGrey Great points, Robert. jQuery is still being developed and has some great features. It may not be something we're all talking about but it continues to be the most popular solution for many.

cody lindley
12/15/2016 2:55:10 PM
I tackled this a while back here: http://developer.telerik.com/featured/jquerys-relevancy-there-and-back-again/ And recently it was discussed here: http://developer.telerik.com/featured/is-jquery-still-relevant/ A reading of these two articles might fuel this conversation. If you have no time for that just consider this thought. "jQuery is still relevant today not because of fixing something that is broken, but because the abstraction improves upon the underlining DOM APIs."

Craig Buckler
12/15/2016 4:08:30 PM
@codylindley Thanks Cody - great links. I agree jQuery still helps streamline inelegant or missing DOM features. However, you generally don't need jQuery in modern frameworks because they abstract the DOM away from you (admittedly, some may utilize jQuery to do that). If you read web dev sites, you'd be forgiven for thinking jQuery was dead and everyone had moved to React, Angular, Vue, etc. Yet jQuery usage hasn't dropped and usage of those frameworks is minimal. Why?

cody lindley
12/15/2016 8:44:01 PM
@craigbuckler - If the question was "Is jQuery still relevant FOR MODERN FRAMEWORKS" (infers JS app frameworks), then I'd somewhat agree. The question is, "Is jQuery still relevant?". Without presupposing a specific context, I'd assert that jQuery is currently widely relevant for a handful of situations, outside of solutions using modern JS SPA solutions. Right? jQuery will be relevant as long as building simple webpages using the DOM and BOM is a thing.

Craig Buckler
12/16/2016 11:21:21 AM
@codylindley Agreed. Admittedly, jQuery is less essential than it once was because browsers are (mostly) compatible and a little vanilla JS can be enough for simpler pages. It's evident that it's still heavily used and is likely to remain so for many years.

Miroslav Popovic
12/16/2016 1:50:37 PM
In addition to what everyone have said so far, jQuery is also used a lot for a bunch of existing libraries and components. I tend to use it a lot less then before, since most of my work lately is with client-side frameworks (Aurelia FTW!). No need for using it for Ajax requests, using standard DOM manipulation and events wherever possible... However, I probably won't try to write my own autocomplete, date picker, enterprise grade grid, etc. There are great existing solutions which in most cases are written as jQuery plugins. Yes, that will change in future, since we are seeing more and more vanilla JS libraries and components, but until we have excellent alternatives to existing jQuery plugins, jQuery will be used.

Matt Honeycutt
12/19/2016 4:01:02 PM
I find myself needing to use jQuery less and less these days, BUT, when I need to do heavy DOM traversal or manipulation, I still prefer to do it using jQuery. Even the jqLite "shim" that ships with Angular is no match for the completeness of jQuery. So yes, I do think jQuery is still relevant, especially for people that are crafting rich widgets and behaviors. The frameworks like React and Angular make it so you don't need to drop down to that level as often, but when you do need to muck with the DOM, jQuery still provides a clean, readable way to do it. One thing I'd like to see is a more module-based approach to jQuery, similar to what lodash has done with their library. It might be tougher to do with jQuery, but I think that might cut down on the complaints that are due to its size.

css_mike
12/29/2016 8:50:46 PM
There are a lot of people learning JavaScript, and many learn jQuery first. That probably accounts for at least some of its continued use. Aside from that, I've seen two common use cases for jQuery within modern apps: 1) So much of interaction boils down to toggling classes on elements. Sometimes $(el).toggleClass('visible') feels preferable to toggling a flag and re-rendering a template with a binding or ternary on that flag. CSS animations can be particularly frustrating with data-bound templates, because in some cases a render will cause the target element to be replaced. 2) As mentioned previously, many (most?) UI plugins use jQuery. If you use such a plugin, you've already got jQuery in your project. If there isn't a clean wrapper of the plugin for your framework, or if someone asks you to customize the behavior of the plugin, not only is jQuery in your project, but you're actively writing jQuery code. For what it's worth, in my current projects I don't use jQuery, but rather a much lighter jQuery-esque utility based on querySelector. This might not make sense if any of my dependencies relied on jQuery, but I avoid dependencies like the plague.