Has jQuery become really dead?

Hello Campers
I am really not sure if my topic is related to this section on the forum, so please, if it was suitable to other section transfer it

I have heard many times from experienced people that jQuery has dead and new javascript versions became more important than jQuery

also I have heard that some companies upgraded from jQuery to vanilla.js

what do you think?

and many thanks in advance

It is definitely not dead. But plain JS and web apis are a lot better than they used to be so you don’t need it as much. It can still be pretty handy. I also think it’s still worth knowing a bit about it, if nothing else just so you aren’t completely lost when you encounter it in some code you didn’t write. Or if you need to work on some codebase that’s using it. Here is an fCC thread that covers some of this.

BWT, vanilla.js is just meant as a joke, it is just plain JS (if that really is what you were talking about).

2 Likes

Much of what’s good about jQuery has been absorbed into browser APIs (because of jQuery).

The differences between how browsers implement DOM manipulation have become much less apparent: jQuery was in part built to paper over the issue of different browsers doing wildly different things.

Many new projects use frameworks/libraries like React/Angular/Vue/etc to abstract away manually dealing with the DOM (which is what jQuery is built for). When they are used there is no need for jQuery.

For Ajax requests (something for which jQuery has a really nice API) very good libraries exist that can just do that (Axios for example), there’s no need for jQuery.

The way jQuery is written and works isn’t really like how most newer libraries are written, and that sorta works against it as well (it’s quite monolithic, ie you get all of it or you get none of it).

It used to basically be mandatory to include jQuery in every project. It isn’t now and it’s steadily dying, although not dead yet. Imo this is a good thing, it did it’s job really well, and it’s now edging toward comfortable retirement.

6 Likes

thanks so much for your reply. it is useful and yes vanilla.js is pure plain javascript.
thanks again.

thanks so much for your detailed reply. it was helpful. I do appreciate that effort and information

1 Like

There are a few libraries out there that have been designed to go obsolete. For example, the Polymer project is planning that much of their codebase will eventually go away, as the shims they provide for Web Components gain better and better traction in browsers.

jQuery is much the same. It was designed and inspired by the browser wars in the late 90’s, early 00’s - the “bad old days” when cross-browser, cross-platform was a pipe dream. John Resig envisioned a toolset allowing users to use the same selection mechanisms, DOM manipulation, CSS manipulation, etc - regardless what browser they were on. Things like $.ajax() were a powerful precursor to the modern fetch().

But jQuery was designed to play nice with other libraries, and eventually, to obsolesce. It was never intended to be a permanent fix: it was hoped that, eventually, the various browsers would come closer to a common implementation. And, by and large, that has happened.

jQuery was also a great tool for those who wanted to learn to code so very badly - and I know many many people who did just that. Learned to code, very badly. It never really required you to know how to write clean, elegant code (though it did support that). Some of the most hideous libraries of spaghetti code are directly children of jQuery.

But it is still thriving, and the basis of a LOT of great sites and frameworks and utilities. Is it the best or the worst thing to happen to javascript? Not by a long shot. It pushed the language forward when it needed a nudge, and it is still relevant.

4 Likes

thanks so much for the reply