TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Weaning yourself off jQuery (2013)

3 点作者 mazeway超过 10 年前

1 comment

voidr超过 10 年前
&gt; 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.<p>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.<p>I don&#x27;t think the above are true for most small NPM modules.<p>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.<p>People are pretty quick to jump on the jQuery-hate bandwagon, the reality is: it&#x27;s still a great tool for building amazing applications.
评论 #8824029 未加载