News for hackers. Stuff that matters.
Re:The other kind of JavaScript fatigue by nzoschke on Saturday July 16, 2016 @10:31AM (#12106436)
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.

Re:The other kind of JavaScript fatigue by scotttrinh on Saturday July 16, 2016 @10:34AM (#12106445)
> 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!

Re:The other kind of JavaScript fatigue by nzoschke on Saturday July 16, 2016 @11:12AM (#12106587)
Thanks 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?

Re:The other kind of JavaScript fatigue by scotttrinh on Sunday July 17, 2016 @07:56AM (#12109873)
It 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.
Re:The other kind of JavaScript fatigue by jakobegger on Saturday July 16, 2016 @11:07AM (#12106564)
Jquery 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.
Re:The other kind of JavaScript fatigue by thesmart on Saturday July 16, 2016 @10:45AM (#12106485)
jQuery, while mature and great, is fairly unnecessary considering all that HTML5 and ECMA maintainers have accomplished since jQuery matured.
Re:The other kind of JavaScript fatigue by douche on Saturday July 16, 2016 @11:03AM (#12106545)
Unless 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.