4 ms·
Most of OP's complaints come from the misuse of JQuery, including compounded performance issues when paired with a SPA framework (in this case Ember, which IIRC
by jonesb6 11y ago
Most of OP's complaints come from the misuse of JQuery, including compounded performance issues when paired with a SPA framework (in this case Ember, which IIRC has a dependency on JQuery either way). Slow + Slow = More slow.
Honestly it's a library. Use it, don't use it, replace it, it honestly isn't worth a million identical arguments. People like to use JQuery as a microcosm for bad javascript practices but guess what JQuery didn't make you do it! It's just a library.
There is no real reason to avoid JQuery. Sure you should, as a good developer, explore alternative solutions for different problem sets. Maybe those alternatives become the standard for your team, maybe they don't. But unless you made a meaningful discovery that can add to the conversation, you don't need to make another blog post about it. Ugh.
- runspired 11y agoYes, some of this is from the misuse of jQuery. But I fix that misuse a lot, so I felt it needed explicitly pointed out. But many of these complaints have nothing to do with misuse and everything to do with either a lack of awareness about selector consequences, or a decade of built up code debt in the jQuery plugin ecosystem. All of these examples are true for all JS frameworks, even non-SPA frameworks. Dynamic DOM is a problem for code that wasn't designed to clean up. There is a real reason to avoid jQuery, that reason is that you want your app to work well. Blindly reaching for a tool from the static age will bite you. > But unless you made a meaningful discovery that can add to the conversation, you don't need to make another blog post about it. Ugh. Guessing this is yours ;)
- jonesb6 11y agoMy reply was a little rough. I just get frustrated because I remember when I was 'new' and would've taken articles such as this as sacrosanct. I just think we have to be careful whenever we say "this is bad, do this instead" because people will often inherently believe you and pass it on.
- unit91 11y ago> But unless you made a meaningful discovery that can add to the conversation... I don't think this applies here. Personally, I learned something from two of his examples, bookmarked the page, and will refactor accordingly. I'll hazard a guess that a few others are in the same boat -- by that standard, the article seems pretty meaningful to me.
- manyxcxi 11y agoTotally agree. I get people love to bash on whatever, but the author actually taught me a few things I didn't know. Well written, good examples of bad and better ways of doing things, I think this provided meaningful information.