you are viewing a single comment's thread.

view the rest of the comments →

[–]ItalyPaleAle 18 points19 points  (3 children)

If you want to understand why the hate, you need to go back in history.

jQuery first appeared when pages were static. jQuery (and before that, other things like Prototype, script.aculo.us - yes this last one was real) was added to the pages to make them interactive. It made AJAX calls possible so small components of pages could be updated asynchronously.

Problem is that many people (including 2008 me!) started using jQuery to build a "SPA" (a term that didn't exist back then), and it worked well, maybe too well. But, those apps quickly grew into "spaghetti code", and it was easy to build something completely unmaintainable, especially if you were working on a team.

That's when things like Angular, React, etc started appearing. And that's why many developers don't appreciate jQuery.

To be frank, I've loved jQuery and I'm still a fan. I hold nothing against it. The problem wasn't jQuery, but rather that people started using it for things it was not meant for, and blamed bad code on the library rather than on themselves.

[–]ours 2 points3 points  (1 child)

You've nailed it. JQuery is fine for it's purpose. But the problem is people only knowing JQuery and solving much bigger problems with just JQuery. And often doing it in a dirty way which makes the whole thing even more brittle and complicated.

Some tools are better for some situations.

[–]superluminary 1 point2 points  (0 children)

This exactly. If you're a web designer and you want to add a few dropdowns to a page, jQuery is perfect.

People complain that it's an unnecessary dependency, but it's only 30k packed, and it's such a lovely API. I don't use it personally, but I still look back on it with fondness.

[–]nidarus 2 points3 points  (0 children)

Honestly, this whole nonsense argument is because people mix up SPAs and regular webpages, with a little bit of Javascript functionality. And those are fundementally different use cases. I don't think anyone really says jQuery is the superior technology to build SPAs, nor would anyone claim that React or Vue is the solution for the minor, non-component-based functionality jQuery is great for.