I’ve been cruising the reddit listings recently and without much searching I found a staggering amount of “jQuery is outdated”, “jQuery isn’t relevant”, “I think jQuery is dying out”, “…forget about jQuery. It isn’t good for anything anymore”, “jQuery hasn’t been relevant for years in my opinion, it’s best to avoid a “career” that requires it”!
Now, I think it’s fair to say: poppycock. But poppycock aside, the question remains: is jQuery still in 2017 (and as we join 2018) relevant and more importantly, is it worth a newcomer learning the library today?
The short answer: yes
Yes, of course it’s worth learning jQuery. The internet is littered with tutorials and knowledge across your peers is vast – that’s to say: help is in abundance.
Moreover: jQuery is prolific in today’s web and there’s an extremely high chance that you’ll use it in your career. Sure, you might work for bleeding edge start up from Sillygone Valley that only uses Ember version pre-release 20 (not a thing…yet), but that’s not the only job you’ll have in your career.
Proof in the wild
How about we look at some real world web sites, and potential employees and clients and see if they use jQuery, and importantly, how many of them.
httparchive:scratchspace (though it’s not an exact science for all libraries, it’s reliable for jQuery based queries).
I’ve queried the HTTP Archive and includes the top 20 results in the charts below.
The chart below is a query from July 2017 aggregating the count of the library name over a total of 474,058 unique URLs collected. The chart shows that jQuery accounts for a massive 83% of libraries found on the web sites.
Reading through the next libraries, jQuery UI requires jQuery, as does Bootstrap and FlexSlider. Modernizr isn’t a “do thing” library, nor are many of the libraries until we hit Angular.JS.
Are web sites staying up to date with their version of jQuery? The version of the library is included in the the
httparchive:scratchspace, so I’ve just looked at the aggregate totals of particular versions:
[email protected] accounts for about 6.4% of all the data points. I don’t think this is because “jQuery is dying out”, but more than jQuery solved a serious problem with browser compatibility and make effects and ajax easy. In today’s modern browsers there’s CSS transitions and a consistent implementation of
XMLHttpRequest or even the
jQuery over time
Finally (and this query appears often): how year on year usage changes. I’ve included Angular.JS for contrast. The table looks like the delta between 2016 and 2017 is showing the first drop in usage (by 2%):
So, although this is a small change, I strongly suspect this will stabilise in the next 5 years, rather than rapidly shrink.
There’s also the startup cost that jQuery affords. It’s extremely cheap for a new developer to copy and paste some code that uses jQuery, and to add the jQuery library to immediately see a result. The same isn’t entirely true with “modern” code using
export default or destructuring, etc. It always work in the browser the individual is using and there’s potential for a rabbit hole of tooling (though of course, I’d recommend they start with something like Create React App first, but this post is about jQuery, not CRA).
You certainly don’t need jQuery today. Nor do you need to learn jQuery. However, jQuery is far from dead, dying, outdated or irrelevant. It serves many developers from many different walks of life.
So, is jQuery still relevant? At the end of 2017: yes.