Live data from Hacker News

Bootstrap 5 will remove jQuery as a dependency

github.com

121–130 of 333 posts

Re: Bootstrap 5 will remove jQuery as a dependency

#121

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 provides an easily customizable (through SASS/LESS variables) base for a web project and the components are very useful. You can even pick/choose components now to keep it more barebones if you wish. It's also very easy to learn. All the utility classes are useful too. Why waste time creating all those components manually? Also as you say it's still great for prototyping and internal applications that don't…

That’s the way I use it already without jquery.

It’s just nice clean flexible sass to start from.

I prefer a 24 col grid as well which takes about 4 lines of sass.

Re: Bootstrap 5 will remove jQuery as a dependency

#123
post #10

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)

I am still more fond of jQuery's ajax functionality than anything that followed, including the fetch API.

I’d say that modern web patterns exist only because of jQuery. jQuery adapted the DOM and did for JS what LINQ did for C#. Replace datastore for DOM.

JavaScript itself has subsumed most of jQuery and replacements like lodash would not have existed without it.

Browsers will catch up badly.

Re: Bootstrap 5 will remove jQuery as a dependency

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

Jquery will fallback to native functions where available and it's feature complete. It doesn't need to have constant commits to still be immensely useful.

Its primary purpose was smoothing over browser inconsistencies and it's cached by every major CDN already so using it is likely faster than trying to rebuild and maintain the individual parts separately.

Re: Bootstrap 5 will remove jQuery as a dependency

#125
post #75

Earlier quoted context omitted.

I believe Vue.js is much better option for this use case (just enhancing UX on an existing HTML page), and is similar in size while giving you much more flexibility.

I only looked at VueJS for about an hour, but it's my impression that Vue.js is much more of an application framework for SPAs than "rich HTML"? Quickly looking at the "getting started" guide doesn't give me the impression that it will work well if JavaScript is disabled? What I want is just intercept some (but not all) form submissions and load the results via AJAX, and such.

You can just use DOM templates with Vue.js. Basically write your HTML the way you normally would and add the Vue.js attributes that tells Vue what to bind with. If JavaScript is disabled you just have plain HTML. It does scale up to doing a full SPA with single file components and compiled templates with Webpack.

Here's a simple form example:

https://jsfiddle.net/ufowkr92/

Re: Bootstrap 5 will remove jQuery as a dependency

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

CSS in JS isn't CSS. It's just SS. It ignores the best part of the language; the cascade.

Re: Bootstrap 5 will remove jQuery as a dependency

#128

I’ve been using Bootstrap styles with React and rebuilding the “active” stuff like modals, navbar, etc. as needed. It’s been pretty painless. I looked at reactstrap, etc. but I’d rather stay clear of unnecessary dependencies.

Reactstrap is cool, but you basically need to re-learn bootstrap. For every component you are using, you need to check their documentation to see if they came up with an attribute for that or if you can use bootstrap classes. It does improves readability, but doesn't pay off IMHO.

Re: Bootstrap 5 will remove jQuery as a dependency

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

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.

Re: Bootstrap 5 will remove jQuery as a dependency

#130
post #93

Earlier quoted context omitted.

You seem to be misinformed. IE11 hasn't been dropped, is supported, and is still the only browser shipping with some versions of Windows as of right now. Older versions of IE have been dropped. And Edge is still their recommending browsing experience and the only one likely to receive enhancements (both will continue to receive security fixes). Key Dates: - Internet Explorer 9: EOL January 12, 2016 - Internet Explore…

> You seem to be misinformed. The PR specifically says "* Remove IE (but not Edge)" and to update docs containing IE references.

You misread the post I was responding to. They remarked that because IE itself was "dropped" that new products, including Bootstrap 5 need not support it.

> IE itself is being "dropped" as well, so long term support commitment for new products does not make sense.

Post reply on HN