4 ms·
The browser targets for BS3 were IE8+ and iOS+. BS4 is IE10+ and iOS 7+. IE10 is 5 years old. If by some miracle you were able to find a website visitor that d
by SippinLean 9y ago
The browser targets for BS3 were IE8+ and iOS+. BS4 is IE10+ and iOS 7+. IE10 is 5 years old.
If by some miracle you were able to find a website visitor that didn't already have jQuery in their cache, loading it from a CDN is pretty light.
The article answers your question:
>the most plausible answer is that jQuery is very good at plugins integration, and Bootstrap has few of them
Their solution? A 50-line JS snippet paired with a polyfill (the the user is less-likely to have cached than jQ). Er, ok, but I'm using a framework so I don't have to write this stuff.
Another example:
>OK, OK … I got it, you also want the chained $(element).on(type, handler) one
And then another snippet. Sure, I could rewrite more verbose, less-tested versions of all the things jQuery gets me OOTB, but why? To save downloading one file from a CDN once?
- Sir_Cmpwn 9y agoTheir "solution" is for the holdouts that insist on using a shitty library forever. It's only in your cache because of this stupid argument people like you make. The time for jQuery is long past and it's time to move on.
- SippinLean 9y ago"holdouts" that want to use plugins? Such luddites! It's in your cache because it's useful; at least your concede that it is likely to be in a user's cache, in which case the added page weight is 0. Seeing as my argument was so terrible, I'd think you'd have an easier time forming a substantive reply, vs the struggle we see here. I don't really understand the value added in your personal attacks.
- Sir_Cmpwn 9y ago>"holdouts" that want to use plugins? Such luddites! Yes. These "plugins" are making your page heavy and wasteful and I hate browsing websites made by these "luddites" because they're slow and annoying and probably selling my information to advertisers. >It's in your cache because it's useful; at least your concede that it is likely to be in a user's cache, in which case the added page weight is 0. It's not like the browser caches the entire JavaScript JIT output. There is a performance impact and more importantly there's a cognative impact from having to use jQuery to interact with Bootstrap on top of whatever sane library (or lack thereof) you're using for everything else. >Seeing as my argument was so terrible, I'd think you'd have an easier time forming a substantive reply, vs the struggle we see here. What sort of substantiation do you think I'm missing? >I don't really understand the value added in your personal attacks. I didn't issue personal attacks, I attacked your argument. I have no commentary about you as a person leaving aside this one issue I disagree with you on.
- SippinLean 9y ago>What sort of substantiation do you think I'm missing? All? Everything you notably had to add in this comment? >using a shitty library >The time for jQuery is long past Easily-found examples of opinion without substance. >probably selling my information to advertisers You think Bootstrap JS plugins are selling your information? I suggest you take a glance at the open source code. >cognative [sic] impact from having to use jQuery to interact with Bootstrap $(div).modal()? I'm ok with that level of cognitive impact. >I didn't issue personal attacks So the "people like you" was entirely impersonal? Forgive my misunderstanding.
- Sir_Cmpwn 9y ago>All? Everything you notably had to add in this comment? What, answers to your questions? Cool it down bud. I assumed from the outset that you didn't actually believe jQuery was a good library but rather that you thought it was acceptable for Bootstrap to use it. If we really need to go over why jQuery is a shitty library, well, see the link you responded to in the first place. >$(div).modal()? I'm ok with that level of cognitive impact. Not just $(div).modal(), but compounded with the fact that everything else is going to be using something other than jQuery. You're probably using React or Angular or something similarly less stupid than jQuery, and you will have pain points everywhere the two systems have to touch. >So the "people like you" was entirely impersonal? Forgive my misunderstanding. Yes, "people like you" who think jQuery is still a good idea in 2017.
- SippinLean 9y ago>If we really need to go over why jQuery is a shitty library, well, see the link you responded to in the first place. I already pointed out that article's shortcomings. You responded with calling jQuery "shitty" and a personal attack. >You're probably using React or Angular Oh sure, I didn't suggest using jQuery with Angular. Please reference the title of the post for the context of my argument. >Yes, "people like you" So, a personal attack. I'm glad we now agree.
- 9y ago
- reificator 9y ago> The browser targets for BS3 were IE8+ and iOS+. BS4 is IE10+ and iOS 7+. IE10 is 5 years old. Sorry, that's my bad for forgetting my audience. My day to day job is to keep things running in IE8 in Quirks Mode. (With a really bad WYSIWYG editor to boot, inside of one of over 30 frames loaded on the page) So in my eyes, IE10 is pretty modern. Not so to the average HN reader. My bad. Still, IE10 is definitely close enough to standards that most of jQuery is wasted on it. Not all, and the parts that are helpful are indeed better tested than writing something yourself. But I find once you start targeting IE10+, most of the time jQuery is a thing to hang pseudo globals off of, and a way to type `$` instead of `document.querySelectorAll`. And in that role, it's not worth the cycles it burns. EDIT: In particular, the thing that gets me is when I go to look up a library and it is only available as a jQuery plugin. But looking inside the code the only uses of jQuery are for selectors, events, and http requests, all three of which are standardized and easy to use without jQuery.
- mixmastamyk 9y agoBootstrap4 uses jquery slim, so not much bloat.
- reificator 9y agoYou know, I had no idea that was a thing... Thanks for the info, I'll go look into that. Last I looked at jQuery was a few months ago, and all I saw was standard or compat. EDIT: Just looked it up, it's still pretty big for my tastes, but I appreciate any reduction in size. Next time I need to bring in jQuery I'll see if I can get away with just slim.