DEV Community

[Comment from a deleted post]
Collapse
 
devinamarsh profile image
Devin

I teach a class that has jQuery in the curriculum. There's a part of me that wants to remove jQuery, make everything es2015 and teach everything vanilla first. Then a small voice in my head reminds me that these students will be in the real world, dealing with real code in a few months. JQuery's so easy to learn, it doesn't hurt to keep it in, and now the students have another library on their resume.

That being said, I can't think of a good reason to keep it in any of my code anymore. I used to keep it around for XHR, but now that fetch is everywhere (and has a small polyfill), I lost my last reason. I'll never hate on anyone for using it, and I'll keep teaching it so long as people are still writing it.

To the point about spaghetti code, if you work at it, I've seen jQuery code modularized in a sane way. But when you're frustrated it's just too tempting to hack out a few hundred lines of imperative nonsense. I think we've all been there.

Fun post! I like this discussion.

Collapse
 
belhassen07 profile image
Belhassen Chelbi

I agree , "I've seen jQuery code modularized in a sane way." but as I said, it's a spaghetti code encouraging library. And talking about real world, ES6 has a growing support even without compiling it into vanilla with Babel for example, so it's there solving a lot of good stuff and I feel JavaScript is even getting fancy with this ECMAScript version and the ones coming.
Thanks for sharing your great ideas Devin ♥