Re:Why you shouldn’t use jQuery but plain JavaScript
by Piskvorrr on Wednesday April 20, 2016 @02:55PM
(#11536798)
TLDR: "Tools of a certain level were good enough for our grandparents, they should be enough for you, young man: there's no point to enhance the tech stack, everything exists already." Um, nope. Learn JS first, and know how and why to use it; don't just take a library for a Golden Hammer - but shunning jQuery for being one level too far from the metal is just plain weird. Remember, we're talking about JS executing in a HTML page inside a browser on top of a GUI on top of an OS on top of...turtles all the way down.
Plus, I sort of remember the Dark Ages, before jQuery. Let me tell you: I'm immensely thankful for an abstraction layer against all those freakish browsers, their versions and their quirks. Can I natively select DOM elements by class name and attribute values in IE9? I don't know, and I don't give a flying fork - life is too short to spend it with browsers.
Re:Why you shouldn’t use jQuery but plain JavaScript
by xlm1717 on Wednesday April 20, 2016 @04:03PM
(#11537319)
Speaking to the reason he's writing this, if a vacancy is asking for jQuery, it probably means they're using jQuery (obvious). The author mentioned other stuff you can use to get specific jQuery functionality, but I think it should be emphasized that if you just got a job where jQuery was a requirement, you should look into implementing alternatives ASAP. One good recommendation I have is to use MinifiedJS:
It has a lot of the things you would need jQuery to do and is tiny and cross-browser. If pure JS isn't an option, MinifiedJS is the next best thing. For now, most web developers should still learn jQuery, but they should transition stuff off jQuery so one day it's not as widespread a requirement.
Re:Why you shouldn’t use jQuery but plain JavaScript
by Nadya on Wednesday April 20, 2016 @04:07PM
(#11537333)
Ctrl+F "browser support" - 0 Results Found
jQuery comes with built-in browser support for a million different issues I'd never know about until I ran into them. A quick browse of the jQuery source will turn up hundreds, if not thousands at this point, of browser support hacks/tweaks.
Plus, I sort of remember the Dark Ages, before jQuery. Let me tell you: I'm immensely thankful for an abstraction layer against all those freakish browsers, their versions and their quirks. Can I natively select DOM elements by class name and attribute values in IE9? I don't know, and I don't give a flying fork - life is too short to spend it with browsers.
http://minifiedjs.com/
It has a lot of the things you would need jQuery to do and is tiny and cross-browser. If pure JS isn't an option, MinifiedJS is the next best thing. For now, most web developers should still learn jQuery, but they should transition stuff off jQuery so one day it's not as widespread a requirement.
jQuery comes with built-in browser support for a million different issues I'd never know about until I ran into them. A quick browse of the jQuery source will turn up hundreds, if not thousands at this point, of browser support hacks/tweaks.
- Life's too short to deal with cross-browser incompatibilities.
- jQuery too heavy for you, there's Zepto.
- Not at all times you are in control of your stack, especially when you just inherited the project.
- If you happen to work on a Drupal project, good luck with ditching jQuery. It's built in.
- Clients will always ask for "cross-browser support up to IE8" without knowing it's a dead browser.
- What matters to clients is that it works. They don't give a beaver's construction project what you used to build it.
I'd wouldn't say "Why you shouldn't use jQuery", but more of "when to and when not to use jQuery/vanilla/CSS3".
Without the standard library.