News for hackers. Stuff that matters.
Re:Bootstrap 5 will remove jQuery as a dependency by alejandromaka on Tuesday February 12, 2019 @06:08PM (#19148644)
in the world of web performance and SEO 85kb is very significant. i wouldnt think twice to remove it if i had the opportunity. compared to modern frameworks, jquery is ~500% larger. you could definitely debate the usage and needs but thats a separate topic than efficiency.
Re:Bootstrap 5 will remove jQuery as a dependency by acdha on Tuesday February 12, 2019 @07:21PM (#19149137)
These massive compressed JS bundles make me think your numbers are off on the alleged golden age of modern frameworks:

https://webpagetest.org/result/190213_XH_63c61dc3d45cb95ec8a...

https://www.webpagetest.org/result/190213_NX_ee1e7ae8fa74557...

It’s not hard to beat jQuery in many cases but they’re looking pretty svelte in comparison:

https://webpagetest.org/result/190213_93_e2da91a07e2b2bc0234...

Re:Bootstrap 5 will remove jQuery as a dependency by sureaboutthis on Wednesday February 13, 2019 @06:39AM (#19152295)
Just because others do bad things doesn't make it OK for you to do bad things.

The biggest complain I read about is javascript downloads being so big nowadays so piling on with jQuery--or anything else--just because frameworks and other libraries are so bloated doesn't make it OK.

Re:Bootstrap 5 will remove jQuery as a dependency by acdha on Wednesday February 13, 2019 @08:09AM (#19152726)
Look, I’ve replaced plenty of jQuery with vanilla JS. I’m totally on board for lighter, leaner pages. My point was simply that there’s this tedious cycle where people crap on the older tools and say everything is better across the board with the current hotness without actually measuring anything. There are a lot of cool capabilities we can use now but they’re only going to be better at the things you actually measure & attempt to improve.

If you don’t profile your app, that cool new stack is probably going to be bigger and slower because tools like webpack make it easy to manage tons of code and you won’t notice until you test it on mobile, slow WiFi, etc.

Re:Bootstrap 5 will remove jQuery as a dependency by sureaboutthis on Wednesday February 13, 2019 @07:19PM (#19158491)
The "cool new stack", in this case, is native, vanilla javascript that works everywhere without downloading anything and without a need to learn someone else's library.
Re:Bootstrap 5 will remove jQuery as a dependency by acdha on Thursday February 14, 2019 @08:19AM (#19161609)
Or, if you actually read the thread you’re replying to, “modern frameworks” where none of that is true.
Re:Bootstrap 5 will remove jQuery as a dependency by munk-a on Tuesday February 12, 2019 @07:04PM (#19149028)
Uh, at least in terms of react a bit of quick googling saw people who were putting effort into optimizing react's client side size getting it down to ~40 - 90 kB, so it seems pretty comparable. Some of these folks had a 1.2 MB script bundle they were sending to the client to begin with.

I'm not in the trenches with this stuff though so my numbers may be wrong but... the ~500% number seems pretty off.

Re:Bootstrap 5 will remove jQuery as a dependency by _oxih on Tuesday February 12, 2019 @07:56PM (#19149369)
https://gist.github.com/Restuta/cda69e50a853aa64912d react is 31kb vue is 20kb preact is 4kb. depends on the framework but 500% isnt far off
Re:Bootstrap 5 will remove jQuery as a dependency by Carpetsmoker on Tuesday February 12, 2019 @07:11PM (#19149070)
The standard download of Vue.js is 95k; React is 120k.

I have no idea where you got your "500%" from, but it seems wildly off-mark.

Re:Bootstrap 5 will remove jQuery as a dependency by alejandromaka on Tuesday February 12, 2019 @07:49PM (#19149325)
https://gist.github.com/Restuta/cda69e50a853aa64912d

react is 31kb vue is 20kb preact is 4kb

Re:Bootstrap 5 will remove jQuery as a dependency by mynameisvlad on Tuesday February 12, 2019 @08:39PM (#19149586)
JQuery Minified and GZipped is also 30KB: https://mathiasbynens.be/demo/jquery-size

When doing comparisons, don't be disingenuous. Compare like numbers.

Re:Bootstrap 5 will remove jQuery as a dependency by Carpetsmoker on Tuesday February 12, 2019 @09:04PM (#19149707)
Plus Vue.js 2.6.6 is 91K, not the 63K of 2.0.3 in that comparison.

It's easy to "win" internet arguments like this rolls eyes.

Re:Bootstrap 5 will remove jQuery as a dependency by alejandromaka on Tuesday February 12, 2019 @10:54PM (#19150254)
whoops i assumed the 85k was already gzipped. fair enough