Live data from Hacker News

Bootstrap 5 will remove jQuery as a dependency

github.com

231–240 of 333 posts

Re: Bootstrap 5 will remove jQuery as a dependency

#231

This is great! This will make bootstrap more attractive and competitive as a framework. JQuery was one of the most important frameworks in Javascript history. It has enabled us to built real webapps. However since then differences between browsers shrunk significantly and we learned how to build maintainable and scalable apps in a more declarative fashion (hello React, Angular and friends)

Whoosh! Bootstrap is going the way of table layouts. Table layouts were great too but times change. Right now we have CSS Grid and it works in all browsers. I am sure they will bring this goodness to Bootstrap 5 but there is no need for the new layout engine that works great in all useful browsers to have a framework wrapper. Similarly with the jQuery, it was once useful in a table layout kind of way but nowadays you…

>Right now we have CSS Grid and it works in all browsers

Globally support seems to be at around 85%-87% [1], all browsers is misleading.

[1] https://caniuse.com/#feat=css-grid

Re: Bootstrap 5 will remove jQuery as a dependency

#232
post #82

Earlier quoted context omitted.

Legacy bootstrap did ship with considerably fat set of dependencies - jQuery, popper, etc. Compare that to Bulma or something more modern, it ships without these dependencies. When the world is moving towards css-in-js and other aggressive ways of trimming unwanted code, removing dependencies is a good move by Bootstrap

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

Is CSS Modules considered to be "CSS-in-JS"? It does require JavaScript to import the class names, but the stylesheet itself is static. I personally find it to be a great solution to the scoping problem, and combined with Sass it's very flexible. Even theming is a cinch with a single shared Sass file with theming variables, or CSS custom properties.

Every CSS-in-JS library I've tried makes everything way too cumbersome with no real upside. I especially hate how they all spread my style declarations all over the place.

Re: Bootstrap 5 will remove jQuery as a dependency

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

220 Comments, I still don't see any one with good enough rational reason for removing jQuery. If you are reimplementing more than a few jQuery stuff to make it work then it shouldn't have been removed in the first place. At least not now.

And now they are dropping IE support, jQuery, which defeat the purpose of these framework in the first place, making it work across multiple browsers.

Re: Bootstrap 5 will remove jQuery as a dependency

#234

Can someone explain why if you like jquery and you're used to it why is it a bad idea or it's not but just personal preference at this point?

I think the reason is that many of the problems JQuery was designed to solve (DOM manipulation, cross-browser compatibility issues, AJAX, cool effects) have now been implemented as standards, either in Javascript or CSS and many developers consider the 55k minified download not worth it. http://vanilla-js.com/

That reference is good but this is a better side-by-side I think: http://youmightnotneedjquery.com/

Re: Bootstrap 5 will remove jQuery as a dependency

#235
post #185

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…

If you actually try to do this yourself, you’ll learn why Bootstrap is popular. You’ll spend plenty of time making everything consistent across browsers, responsive, visually consistent, accessible (a legal requirement for most of us), etc. If you’re working on a big project with a dedicated team, that approach can give you quite a lot but there are a ton of projects which prefer to spend their time on the core produ…

> 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 differences in font rendering.

Re: Bootstrap 5 will remove jQuery as a dependency

#236
post #145
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…

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…

FWIW, git is actively being developed. I see both pull requests and traffic on the git mailing list pretty much every day.

Re: Bootstrap 5 will remove jQuery as a dependency

#237
post #185

Earlier quoted context omitted.

If you actually try to do this yourself, you’ll learn why Bootstrap is popular. You’ll spend plenty of time making everything consistent across browsers, responsive, visually consistent, accessible (a legal requirement for most of us), etc. If you’re working on a big project with a dedicated team, that approach can give you quite a lot but there are a ton of projects which prefer to spend their time on the core produ…

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

Re: Bootstrap 5 will remove jQuery as a dependency

#238
Wait, Bootstrap has JavaScript now? I've been feeling guilty for not removing Bootstrap 2.3.2 as a dependency from my personal site (https://andrewkelley.me/) for a while now, and as far as I can recall, it was only CSS. Boy am I out of the web dev loop.

I'm quite happy with my newest site (https://ziglang.org/), which has a dependency on... nothing! With cache off, 54.36 KB / 50.08 KB transferred. Cache on: 54.36 KB / 0 B transferred. No JavaScript.

Re: Bootstrap 5 will remove jQuery as a dependency

#239

Earlier quoted context omitted.

And when the wheel is so bloated the car can barely make it down the road without needing to refill the fuel tank a new more lightweight reliable wheel that can handle modern terrain is needed. That is why people are moving away from Jquery.

I am going to root for bloated jQuery to save my life! $('.tpm_sensors').forEach(function(sensor) { if (sensor.pressure vs: var tpm_sensors = document.getElementsByClassName('tpm_sensors'); for (var i = 0, len = tpm_sensors.length; i < len; i++) { var sensor = tpm_sensors[i]; if (sensor.pressure < threshold) fixBeforeIDie(); }

[deleted]

Re: Bootstrap 5 will remove jQuery as a dependency

#240

Earlier quoted context omitted.

And when the wheel is so bloated the car can barely make it down the road without needing to refill the fuel tank a new more lightweight reliable wheel that can handle modern terrain is needed. That is why people are moving away from Jquery.

I am going to root for bloated jQuery to save my life! $('.tpm_sensors').forEach(function(sensor) { if (sensor.pressure vs: var tpm_sensors = document.getElementsByClassName('tpm_sensors'); for (var i = 0, len = tpm_sensors.length; i < len; i++) { var sensor = tpm_sensors[i]; if (sensor.pressure < threshold) fixBeforeIDie(); }

No need to load a slow bloated library. Learn modern DOM methods. Reading does wonders, my opinion.
Post reply on HN