4 ms·
I see his point and I think another dimension of the tooling is a root cause too... > Recently I needed a library to build query strings, just a small one so t
by nzoschke 10y ago
I see his point and I think another dimension of the tooling is a root cause too...
> Recently I needed a library to build query strings, just a small one so that I wouldn’t have to include jQuery just for that. After a couple of hours of research...
jQuery clearly is the best library to look to for a mature implementation. So why not just use it? Hours looking for alternatives is actually really expensive.
The justification is that jQuery is too big.
First It's probably not too big. CDNs and browser caching exist to optimize the problem upstream.
Next, the dynamic nature of JavaScript is to blame. You can't easily extract and compile just the functions you need.
Ideally we could all leverage bits of jQuery instead of poorly rewriting parts of it in the name of minimalism.
- scotttrinh 10y ago> Next, the dynamic nature of JavaScript is to blame. You can't easily extract and compile just the functions you need. Definitely check out rollup, if you haven't heard of it. We (the JavaScript community) are working towards solving this!
- nzoschke 10y agoThanks for the tip, rollup looks really powerful. This and related comments remind me that the latest ECMA stuff offers a brighter future. The challenge is getting there... Can/will jQuery work with rollup and all the other new module work? Or does it have to be effectively rewritten?
- scotttrinh 10y agoIt needs to be rewritten, unfortunately. However this isn't just rewriting it so it works with one tool, since this is the new module syntax. I imagine that a future version of jQuery, and probably most libraries going forward, will want to take advantage of ES2015 modules, even if it's just to aid in their own internal development. Since we have module bundlers like rollup, it would be easy to still provide an ES5 bundle for environments that do not use ES2015 modules yet.
- thesmart 10y agojQuery, while mature and great, is fairly unnecessary considering all that HTML5 and ECMA maintainers have accomplished since jQuery matured.
- douche 10y agoUnless you are unlucky enough to still be locked into the (thankfully ever shrinking) world of enterprise web apps, where stuff needs to work on old, unupdated version of IE.
- jakobegger 10y agoJquery can take several seconds to download on a mobile connection. If you think several seconds of lag for every first time visitor is acceptable, you clearly have a different set of priorities than I do.