top | item 10976582

(no title)

runspired | 10 years ago

Author here:

I whole heartedly agree, which is why with each point I made I did more than just list what was bad, but how to do better, even with jQuery. The real reason not to use jQuery isn't because jQuery is bad, it is because as a tool it / it's ecosystem is poorly prepared for dynamic html, so if you are going to use it, you need to know the limitations and challenges it brings.

discuss

order

dsp1234|10 years ago

It's certainly nice to see the rationale behind your decisions. However, most of them just turn out to be something along the lines of "understand javascript and the DOM", and not really about jquery at all.

For example:

"To be fair, this is no different than cacheing an element or array of elements on your own, and forgetting to de-reference it later when you are done"

or the examples about attaching/detaching event listeners where the hypothetical developer is gathering elements by the equivalent of document.getElementsByClassName. If a developer is going to make that kind of mistake, then that's an error that's going to occur regardless of the framework.

There are certainly reasons to not use jquery in some cases, but this article seems a bit too much like "Do good development, don't do bad development". Drop jquery from the body of the content and the title, and the lesson will still be the same.