HTML, CSS, and JS weren’t as developed as they are now, DOM manipulation was a royal pain to get right, and browser interop could be a particularly punishing endeavor, and on top of all that the limited JS standard library meant a lot of wheel reinventing
jquery brought solutions to those issues quite well, and was an essential tool, saving countless development hours and debugging
since then, vanilla of all 3 parts have absorbed a lot of the features that were once unique to jquery, with some exceptions, and in comparison to browser built-ins, jquery doesn’t seem as appealing as it once was
I think the perception then changed from requiring jquery to do basic and advanced tasks and being thankful it was available, to the perception that one is worsening their own product by not using more modern native features that can achieve the same thing
A lot has changed in the culture very rapidly over even just a few years
I wouldn’t say most are disparaging jQuery as they are promoting higher-level alternatives to it. jQuery is all about directly manipulating the DOM in a very procedural way: update this data, find this element, give it this class, put these elements in it, find that element, remove these classes, and so on. Modern frameworks like React and Angular are far more declarative, saying “this data belongs to this part, here’s how it looks, now take care of it whenever it changes”. Underneath, they still do manipulate the DOM, but it’s not something you do directly anymore with these frameworks.
So for a lot of applications, jQuery isn’t bad, it’s simply obsolete. Such is the way of progress.
I wouldn’t say most are disparaging jQuery as they are promoting higher-level alternatives to it.
Well, some people are definitely disparaging JQ. I hear people rant about it all the time.
But as you both point out, it was very important at one point, but advances in JS etc have made it less needed and there are other more modern libraries and frameworks that are more popular. It’s good to know the basics of JQ, but if it’s all you know, it may raise some eyebrows. I’m guessing that there aren’t nearly as many new projects being started with JQ, but there’s probably a lot of legacy work for it.
It’s good to learn, but don’t end there. FCC also teaches React which is a popular alternative.
Now, most of what was good about jQuery has been absorbed into the browser API (the selectors for example, querySelector and querySelectorAll). And for Ajax in particular, although the jQuery wrapper is great, there are dedicated libraries that do exactly that (eg Axios). But putting aside these things: React/Angular/Vue etc. abstract away needing to deal with manually making DOM updates. Which is the entire point of jQuery. Thinking about this, I haven’t needed to do that kind of widespread direct DOM manipulation for years now, and I don’t think that is at all uncommon. That’s a massive part of why it isn’t something people automatically reach for now (as they would have 10 years ago).
It is not that it is bad , its just with JS dom now being more powerful alot of the complexity JS used to have is already addressed and hence there are less reasons to use jquery. JS has improved by including methods like like querySelect() and .addclasslist(). Since js dom has already reduced alot of complexity with new methods the difference jquery provide for less code is minimal and hence becomes unessary as with any library it increases the page loading time
Honestly , you dont have to make a big deal whether to learn jquery or not , people look at frameworks the wrong way similarly to bootstrap.The purpose of any library and jquery is to reduce coplexity in code and you decide whether if its worth for your project. Alot of document examples are still written in Jquery , and even if you want to use pure vanilla JS you still need to look at examples and translate jquery to pure JS.
I have used jquery and bootstrap for my final year project for example because writing it in pure css and js takes alot of time to write so using a framework make sense.Regardless you should spend more time in the fundamentals on your own personal projects ( html,css and js) because there are alot of times you have to tweak code and you have to look at the underlying structure of libraries like changing certain css in bootstrap for example
So learn jquery if you want to , but don’t spend alot of time in it. The core foundations are more important to learn in your own time, with strong foundations picking up jquery won’t take long at all to be able to apply it on your projects.
The good news is jQuery is easy to pickup and learn, and if you’re just doing CSS manipulation (say menu system, UX/UI interface), jQuery and CSS together allows you to make complex work with just a few lines of code.
Now, if you’re relying on using jQuery for updating Model-View, it’s a bad idea beyond simple updates. It quickly becomes hairy when you need to update multiple things at multiple places. I think you’ll better be served using a proper JS framework for this… React, Angular, or VueJS.
As for the large file size download of jQuery, that’s just a red herring. That’s more of an exaggeration from the jQuery haters.
$ ls -lhS
566K Jan 4 22:03 angular2.min.js
563K Jan 4 22:05 angular2.0.0-beta.0-all.umd.min.js
486K Jan 4 21:50 ember.1.13.8.min.js
435K Jan 4 21:48 ember.2.2.0.min.js
205K Jan 4 22:06 angular2.0.0-beta.0-Rx.min.js
144K Jan 4 21:59 react-with-addons-0.14.5.min.js
143K Jan 4 21:46 angular.1.4.5.min.js
132K Jan 4 21:56 react-0.14.5.min.js
121K Jan 4 21:35 angular.1.3.2.min.js
5.3K Jan 4 22:00 redux-3.0.5.min.js
706B Jan 4 21:57 react-dom-0.14.5.min.js
63K Oct 13 03:02 vue-2.0.3.min.js
Fixed the link. Not sure what happened there. Like I said I’ve just begun my learning so small projects is all I can do right now. JQuery is fun and easy for sure, but I understand it’s not the end game. Thanks!
Yeah- don’t take my posts as the standard. Everyone is entitled to their own opinion.
jQuery has a lot of legacy code out there so it’s important to know how it works.
The main point I’m suggesting is to learn vanilla first. Many of the things jQuery offers is easily implemented in vanilla and it works significantly faster.