Live data from Hacker News

Bootstrap 5 will remove jQuery as a dependency

github.com

281–290 of 333 posts

Re: Bootstrap 5 will remove jQuery as a dependency

#281
post #162

Earlier quoted context omitted.

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.

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...

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

#282

Earlier quoted context omitted.

Just curious, what's your opinion on their decision to remove the headphone jack?

That's one of the post Apple Computer decisions that bugs me. I'm a relic and like my headphones with wires attached. My wired cans have this unique feature of not needing to be recharged.

Now you know how everyone else felt when Apple killed the floppy.

Re: Bootstrap 5 will remove jQuery as a dependency

#283

Earlier quoted context omitted.

> If you actually try to do this yourself, I do frequently. There are many things in life that are hard and cross-browser CSS is not among them. In the past I have found things like Bootstrap and jQuery to be more of a frustration than a benefit by introducing cross-browser differences in their attempt to help . At the same time they don't fix the cross browser differences that really impact layout, such as differenc…

But you have to admit that this takes an inordinate amount of time. Some folks would prefer to have Bootstrap handle the CSS while focusing on the core product.

No, writing CSS is pretty fast and straight forward. I spend far more time wading through ever changing business requirements and adjusting the JavaScript UI to compensate for those changes.

Re: Bootstrap 5 will remove jQuery as a dependency

#284
post #39

This PR is massive and represents a year and a half of work. If you look at the comments you see there are loads of browser-specific issues being fixed. IE support was dropped as they didn't feel making stuff compatible (jQuery did that for them before). The API is also incompatible; in the words of one dev: "we broke everything". As one of the commenters pointed out, a lot of stuff was copied from jQuery to make it…

> Whereas before it was "jQuery for EVERYTHING", now it seems to be the reverse: "remove jQuery from EVERYTHING", Reminds me of "replace ALL tables with divs" in the mid 2000s. I actually saw developers spending inordinate amounts of time using divs and css to display tabular data across browsers (which back then meant the one you used: Firefox, and the one everyone else used: IE6). I'm not sure what causes this blac…

Herd thinking.

Magpie developer-ing.

But, really just mediocrity.

Re: Bootstrap 5 will remove jQuery as a dependency

#285
post #265

Earlier quoted context omitted.

document.querySelectorAll('.tpm_sensors').forEach((sensor) => {if (sensor.pressure < threshold) { fixBeforeIDie(); }});

and you usually define $ and $$ as querySelector and querySelectorAll at the beginning of the file if you don't like writing them all out, so they're exactly the same length

I remember the mess that came before jQuery. This is quite literally what we did back then, just with a custom made snippet of JS for finding by id and by class. It sucked. I mean to me Bootstrap is just a black box library, I don’t care how it works as long as it does. But this is going to suck for those working on its code.

Re: Bootstrap 5 will remove jQuery as a dependency

#286
post #82

Earlier quoted context omitted.

Only part of the world is moving to css-in-js. I won't be on the boat leaving for that destination.

Completely agree - I find the current trend (and that's what I see it as) of css-in-js to be most disagreeable. CSS works fine without JS, or even better with SASS/LESS.

I both love it and hate it. I love it because a lot of the supporters, on the inside, hate it too. They've spent the last decade saying, ya gotta keep 'em separated. Now they have to say no, it is fine to mix 'em. And it's killing them to say it, but they need jobs, so they follow the herd.

But, yeah, other than that, it's a stupid idea.

Re: Bootstrap 5 will remove jQuery as a dependency

#287
post #145

Earlier quoted context omitted.

GitHub is a terrible metric. You probably use tools like grep and ls many times a day... you do not check if ls is up to modern standards and has a constant stream of issues and fixes. You don’t do it for grep, or git...you depend on git. You cannot apply instant gratification to software library dev. If the work for a library was done and satisfied in 2015, then it’s fucking done. It’s tried and tested. It gets secu…

There's no such thing as "done" software. Your view is incompatible with reality, I'm afraid. Yes, I did check whether ls was still actively being developed, saw that it wasn't doing anything new, and switched to exa, which is a fantastic little project, with sane defaults, less cruft, and greater speed. You can always improve software, some people just get bored of doing so, and then declare it "done". But it isn't,…

So you are like Barney from How I Met Your Mother? “What’s my other other number one rule Ted? New is always better!”

How many times can you update a URL parser or leftpad? Do you need to update them just to up your GitHub activity meter?

Re: Bootstrap 5 will remove jQuery as a dependency

#288
post #162

Earlier quoted context omitted.

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...

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.

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

#289
post #181

Earlier quoted context omitted.

It needs to be querySelectorAll, and you need to handle cases where it returns null as well.

Darn, that's what you get from typing on mobile. Ment to use querySelectorAll originally. But apart from null handling (which can be solved using `|| []`), what else would be lacking? I used a similar version of this for a few projects a while back, with some additional stuff for query context and ID selector -> getElementById I think, but that's basically it...

It definitely works, I've written `document.querySelectorAll(x)||[]` many times. If all you're doing is making a few simple queries, it works fine.

Re: Bootstrap 5 will remove jQuery as a dependency

#290

This is funny. I was thinking that Bootstrap should be suffering the same fate as jquery. That is, it’s relevance should be decreasing as web technology catches on. I see no reason for using a third party layout system now that CSS has `display: flex;` and `display: grid;`. As for modals and menus, HTML has ` ` and ` `. And for reusable components, we have custom elements, that you can either implement your self (not…

Well, if you want to build something that has animations and feels like a native app (e.g. PWA), you will probably skip bootstrap (and take something like framework7 [1]). But if you just want to build a plain old server rendered website bootstrap is still very useful as a reliable default theme for your HTML documents.

Nevertheless, recently I tried spectre.css [2] and liked it a lot better than bootstrap as it doesn't feel so heavy (don't know how it performs in terms of browser compatibility).

[1]: https://framework7.io

[2]: https://picturepan2.github.io/spectre/

Post reply on HN