Settings

Theme

Weaning yourself off jQuery (2013)

substack.net

3 points by mazeway 11 years ago · 2 comments

Reader

voidr 11 years ago

> As programmers build up applications up from lots of tiny components, if every component included a vendored jquery version, the total javascript size quickly baloons into multi-megabytes. When the jquery version gets pegged, version incompatibilities arise that likewise create redundancy issues. When the jquery version is left to float or its use is demanded externally in the documentation, this also does not scale well and makes it cumbersome and error-prone to use tiny pieces.

jQuery has a stable API, a clear migration path and a working compatibility layer. jQuery is well documented and well known, if you have an issue you can get help easily.

I don't think the above are true for most small NPM modules.

The author blames jQuery for a deficiency of the NPM: If you have module A and B, which include the same version of module C, then C gets loaded twice. Not all useful modules can fit into a few kilobytes.

People are pretty quick to jump on the jQuery-hate bandwagon, the reality is: it's still a great tool for building amazing applications.

  • poseid 11 years ago

    this post gives a nice overview on native DOM functions. not every app needs JQuery otherwise we would not have Zepto, SnapSVG, RaphaelJS, ...

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection