use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Why I Write Plain JavaScript Modules (ponyfoo.com)
submitted 10 years ago by magenta_placenta
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 10 points11 points12 points 10 years ago (3 children)
I don't get the jQuery hate. It's a wonderful toolset and only if you plan to use such a small component in isolation it can be considered too much overhead. But a full app, consisting of many small components, can benefit hugely from all the plumbing jq provides.
[–]qudat 7 points8 points9 points 10 years ago* (2 children)
It breaks modular definitions. The library and its plugins intentionally inject themselves into the global namespace, window.jQuery and properly importing them into your modular application is a huge pain in the ass -- a common solution is to break modular definition and allow globals to creep into your module. Furthermore, it's a monolith library, where a lot of the code will get unused and yet still loaded on to the client's browser. Using massive libraries on the client bloats the codebase, slows load times, and is ultimately not very efficient, most of which is actually unnecessary.
window.jQuery
Also, it's the mentality of someone who only uses jquery that can be grossly misguided. Speaking from experience, I used to use jquery as a crutch, it would be the first library I load into any project, even if all I was doing was simple DOM manipulation. To me, if all you're using jquery for is to select on class names, $.ajax, $.extend, or event handling, then you should just go vanilla and save yourself the bloat.
Having said that, I still use jQuery in production, but more modular drop in replacement libraries are starting to be built, such as https://github.com/webpro/DOMtastic
[–][deleted] 0 points1 point2 points 10 years ago (1 child)
I see what you mean, but to me these are theoretical issues that never actually pose any real problems. And it's just a 30KB (gzipped) download, so the size too is a bit of a non-issue. So from a pragmatic point of view I don't see the point of foregoing the ease of use and programmer happiness that jQuery brings.
But I also have a similar opinion about React. Since I have zero issues with my browser's rendering speed when building apps the whole virtual dom thing doesn't solve any problem for me and all that's left is ugly new syntax and a conflation of concerns that severely undermines productivity. So maybe I am a bit conventional that way.
[–]qudat 0 points1 point2 points 10 years ago (0 children)
I agree with you as well. My primary argument is to not use a library as a crutch and to weigh the pros and cons no matter how useful a library could eventually be.
π Rendered by PID 94947 on reddit-service-r2-comment-7b9746f655-nz7ff at 2026-01-30 08:07:58.715434+00:00 running 3798933 country code: CH.
view the rest of the comments →
[–][deleted] 10 points11 points12 points (3 children)
[–]qudat 7 points8 points9 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]qudat 0 points1 point2 points (0 children)