Live data from Hacker News

Bootstrap 5 will remove jQuery as a dependency

github.com

151–160 of 333 posts

Re: Bootstrap 5 will remove jQuery as a dependency

#151
We've had great success with the bootstrap-native fork (same css, different vanilla javascript). It's super lightweight, fast and the css is just as customizable (since it's unchanged from normal bootstrap). I look forward to getting something similar in the mainline :)

https://github.com/thednp/bootstrap.native

Re: Bootstrap 5 will remove jQuery as a dependency

#152
post #48
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…

jQuery _did_ lots of useful stuff. It's unmaintained, has no interest/support (look at their github), doesn't adapt to modern features, is 'slow' compared to other frameworks that now use the Shadow Dom, and can be replaced with features that are native to JS - what's there not to like about that? One less dependency, network request and more efficient code is always worth the effort. Oh, and since the new code is va…

Less dependencies is a wonderful thing but... why not take an approach where alternative tools (like the shadow DOM) are preferred for new features and refactorings, just slowly deprecate it out of existence.

It's always nice to have both feet securely on the ground as you shift your weight from one dependency to another.

Re: Bootstrap 5 will remove jQuery as a dependency

#153
post #48

Earlier quoted context omitted.

jQuery _did_ lots of useful stuff. It's unmaintained, has no interest/support (look at their github), doesn't adapt to modern features, is 'slow' compared to other frameworks that now use the Shadow Dom, and can be replaced with features that are native to JS - what's there not to like about that? One less dependency, network request and more efficient code is always worth the effort. Oh, and since the new code is va…

jQuery may be outdated from a JS point of view, but nothing beats its syntax. Nothing is as simple and straightforward.

Indeed it's polymorphic overloads ( over 10 on the $() method! ) were commendated in The book 'modular JavaScript' i'm reading right now. Whilst it would be questionable offering quite that many options nowadays on a library method it certainly helped devs get productive quickly and helped it become a such a success

Re: Bootstrap 5 will remove jQuery as a dependency

#154
post #9
post #2

Which will be ready for February 2022

I know you're sarcastic but Bootstrap has been picking up steam recently. The jQuery removal has been in the work since 2017. If you want faster releases then feel free to submit PRs :)

I’ve got a week to burn next week. I might take you up on that

Re: Bootstrap 5 will remove jQuery as a dependency

#155

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…

So long as native web controls are look so awful, we need something like bootstrap

The layout support in Bootstrap is nice, but the baseline design language is more important

Re: Bootstrap 5 will remove jQuery as a dependency

#156

Earlier quoted context omitted.

But this isn't replaced with a new framework that uses the shadow DOM, it uses the same techniques as jQuery, except without jQuery. jQuery already uses many native features when supported, while also working around browser quirks and such. It's less of an issue than in the past, but it hasn't gone away completely; see all the comments/fixes for specific browsers. > One less dependency, network request and more effic…

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.

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

#157

Earlier quoted context omitted.

But this isn't replaced with a new framework that uses the shadow DOM, it uses the same techniques as jQuery, except without jQuery. jQuery already uses many native features when supported, while also working around browser quirks and such. It's less of an issue than in the past, but it hasn't gone away completely; see all the comments/fixes for specific browsers. > One less dependency, network request and more effic…

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.

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

#158

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…

Bootstrap sets a solid foundation for enterprise projects, where there are often many disparate projects, many developers, many deadlines, more concern with function vs. style/brand.

"because that is what they know and don’t bother picking up the new standards"

That's just an unnecessary comment and plain wrong.

Re: Bootstrap 5 will remove jQuery as a dependency

#159
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…

A thing I always didn't like of Bootstrap is that it requires you to load a full version of jQuery just to use it. Maybe I don't need the whole jQuery, because I use another framework, or because I have a very simple site that doesn't require any JavaScript at all. The thing is that when Bootstrap first launched everyone was using jQuery, so it was a de facto standard, everyone already had it, so requiring it as a de…

> A thing I always didn't like of Bootstrap is that it requires you to load a full version of jQuery just to use it.

You can just use the CSS and ignore the JavaScript parts, or write your own JS to build the CSS, which is what I did (twice, at the different jobs).

I never liked the Bootstrap JavaScript for a host of reasons. Unfortunately this incompatible rewrite fixes exactly nothing of that.

Re: Bootstrap 5 will remove jQuery as a dependency

#160
post #48
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…

jQuery _did_ lots of useful stuff. It's unmaintained, has no interest/support (look at their github), doesn't adapt to modern features, is 'slow' compared to other frameworks that now use the Shadow Dom, and can be replaced with features that are native to JS - what's there not to like about that? One less dependency, network request and more efficient code is always worth the effort. Oh, and since the new code is va…

> One less dependency, network request and more efficient code is always worth the effort.

Except that 90% of sites that use BS5 will continue to use JQ for other things anyway so, in reality, you won't have less code, fewer requests, etc.

Personally I've felt for a while that JQ's day in the sun is over and that developers should really think about whether they need it or not. Maybe really getting rid of it starts with slightly risky moves like this. Like when Apple killed the floppy.

Post reply on HN