Earlier quoted context omitted.
I am still more fond of jQuery's ajax functionality than anything that followed, including the fetch API.
fetch is very bleh, so that's not a high bar. What I'd love to see is more Observable-based offerings in that space... RxJS has some rudimentary client, but seeing that pushed further would be great.
Bootstrap 5 will remove jQuery as a dependency
61–70 of 333 posts
Re: Bootstrap 5 will remove jQuery as a dependency
#62Re: Bootstrap 5 will remove jQuery as a dependency
#63Which will be ready for February 2022
Re: Bootstrap 5 will remove jQuery as a dependency
#64Earlier quoted context omitted.
Why? fetch returns a native promise, which are _much much much_ nicer to work with than XHR ever was or desired to be. Good riddance.
For one, fetch() doesn’t support progress reporting.
Re: Bootstrap 5 will remove jQuery as a dependency
#65Earlier quoted context omitted.
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…
> 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. Which is irrelevant, as Bootstrap is much more than a grid system. Not to mention it's not meant for the types to mess with their own custom grid layout anyway.
I was the biggest fan of Bootstrap ever about five or more years ago, a total evangelist. But it seems to be just another flavour of div soup really. I have moved on.
Even things like cool scrollspy things aren't worth the bloat or the learning requirement. I also prefer to learn real things rather than fake framework things. Now the tools are needed in modern browsers you might as well do it properly and learn something useful rather than follow some convenient hacks. It is quicker.
Re: Bootstrap 5 will remove jQuery as a dependency
#66Earlier quoted context omitted.
I'm not a big fan of bootstrap but it does a heck of a lot more than just grid layouts. You can't just easily replace the components (modals, accordions, buttons, etc) with CSS grid.
It is not just `display: grid` that is replacing the layout. Now we also have interactive elements in the HTML spec[1] like ` ` and ` `. We also have custom elements making an all in solution like bootstrap less desirable for everything except quick prototyping. [1]: https://html.spec.whatwg.org/multipage/interactive-elements....
Re: Bootstrap 5 will remove jQuery as a dependency
#67I 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 that hard) or pull from a library (using javascript modules).
Really the only reason I see anyone using CSS frameworks like bootstrap is for quick prototyping or because that is what they know and don’t bother picking up the new standards (which is ironically where jquery was a few years ago).
Re: Bootstrap 5 will remove jQuery as a dependency
#68This 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 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 efficient code is always worth the effort.
Of course not. It's a return-of-investment calculation. The 85k of jQuery isn't all that large, especially considering that websites like Medium and NYC load 2MB of JS, and the overhead of jQuery compared to standard JavaScript is minor.
Re: Bootstrap 5 will remove jQuery as a dependency
#69Earlier quoted context omitted.
Really? I'd have guessed bootstrap will be phased out completely by CSS grid, which does essentially what bootstrap does...
Right - so you get all the functionality of bootstrap using CSS grid; all the modals, spinners, buttons, and most importantly: browser bug fixes and quirks people contribute over time. Bootstrap is a _framework_, not just a layout system. Also, BS uses Flexbox at the moment, I doubt they'll go to grid any time soon.
Re: Bootstrap 5 will remove jQuery as a dependency
#70This 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…
> In other words, this entire effort seems of dubious benefit to me.
You made other points, but I wanted to focus on this one. Yes, there's a few remaining bits that don't have standards. But you can do so much with querySelector, classlist.toggle(), lastElementChild, scrollIntoView, insertAdjacentHTML - literally every JavaScript answer on SO is now "2016: all current browsers now support X".
Yeah, I'm sure they had to patch in a lot, but I'm also sure they didn't have to recreate everything.
Side benefit: also no weird $(thing)[0] when you need to use a DOM API, like HTML5 validity or whatever.