5 ms·
> Is there any objective reason not to use it Absolutely. UI via jQuery involves heavy use of method chains each having loops and possibly nested loops. Ther
by austincheney 8y ago
> Is there any objective reason not to use it
Absolutely. UI via jQuery involves heavy use of method chains each having loops and possibly nested loops. There are more direct ways to achieve UI code that execute faster, have less code to maintain, and deliver less across the wire. Those are all qualities that can be objectively measured.
Conversely, my own code is battle tested and stable and is any code that is well tested, based upon the standards, and works across supported browsers. When I read "battle tested" as a justification for a large abstraction library it sounds like you aren't testing your code thoroughly cross-browser.
- tomc1985 8y ago> Conversely, my own code is battle tested and stable and is any code that is well tested, based upon the standards, and works across supported browsers. When I read "battle tested" as a justification for a large abstraction library it sounds like you aren't testing your code thoroughly cross-browser. It's less a justification for a large abstraction library and more a statement to its persistence since, what, 1997? And what's wrong with loops anyway? What kind of programming are they teaching y'all that simple primitives are so out of fashion?
- austincheney 8y ago> And what's wrong with loops anyway? Millions of unnecessary instructions for what is often easily accomplished with a single assignment makes things slow and increases complexity.
- tomc1985 8y agoAs does nearly any large library. The more abstraction you add the more complex things get. And "millions" is a bit of an overstatement, no?
- austincheney 8y agoNo, it isn’t. jQuery often breaks in IE, because instead of using a timer to determine long running code IE uses 5 million instruction count. Simple jQuery implementations would blow past 5 million instructions on load in a fraction of a second. I encountered this failure often when I used to work at Travelocity.
- krapp 8y ago>When I read "battle tested" as a justification for a large abstraction library it sounds like you aren't testing your code thoroughly cross-browser. Most developers nowadays only develop in and test in Chrome, but things still seem to work. Either cross-browser testing really isn't necessary, or whatever they are using instead of jQuery is doing the same work to patch inconsistencies between browsers.
- austincheney 8y ago> Most developers nowadays only develop in and test in Chrome Fail. I have no sympathy for laziness. If you are getting paid to do this work this is a core responsibility. Worse is that it isn’t hard to get right.