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 would not call Jquery bloated, relative to what is typically found on a website. Some of us still like using it, as the syntax is convenient and functionality reliable. There's an elegance and readability about it that appeals to me more than vanilla JS.
Bootstrap 5 will remove jQuery as a dependency
241–250 of 333 posts
Re: Bootstrap 5 will remove jQuery as a dependency
#242Earlier quoted context omitted.
> But looping over querySelectorAll() is painful. Not any more: let elements = document.querySelectorAll('.some-class') elements.forEach(function(element){ ... }) https://developer.mozilla.org/en-US/docs/Web/API/NodeList/fo... PS. The other two answers here are outdated.
> PS. The other two answers here are outdated. Sure, the other two answers may be "outdated" but they're still extremely useful if you're looking to calling map/filter/etc against your queried elements.
const elements = document.querySelectorAll('.some-class');
const values = Array.prototype.map.call(elements, element => element.value);
or more idiomatically (and perhaps a little slower): const elements = [...document.querySelectorAll('.some-class')];
const values = elements.map(element => element.value);Re: Bootstrap 5 will remove jQuery as a dependency
#243Earlier quoted context omitted.
IE will go EOL for the majority of users well before 2025, simply because they're not adding features and the web _will_ break (and is already breaking) as a result. Imagine TLS 1.4, or some other change that will occur that will completely break IE11. Instead, Microsoft will ship Edge with Chromium (even on Windows 7) and say "use that instead" and will eventually remove IE altogether.
And enterprise users will block the update and continue demanding that all of their vendors support IE11 and I will continue smashing my head on the desk finding 10 year old bugs.
Re: Bootstrap 5 will remove jQuery as a dependency
#244Do you use Bootstrap? If yes, what version? If not, why not? Which alternative do you use?
Re: Bootstrap 5 will remove jQuery as a dependency
#245Earlier 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…
That said, I'm still waiting for a js framework to come around that uses the shadow dom that isn't terrible in some way. Like something with the light-weight unopinionated-ness of jquery, but modern features. I don't want to use whatever paradigm some framework enforces, just let me use the new features, with whatever paradigm I feel like making myself.
I built the framework so developers can take advantage of the benefits of modern frameworks (templating, data binding, state management, no explicit DOM manipulations, automated unit testing, loosely coupled modular components, etc) but without the typical drawbacks of modern frameworks. The framework has far fewer abstractions than React or Vue, requires no domain specific language (i.e., you write in plain HTML, CSS and JS), and does not require compiling/transpiling. The framework embraces the DOM instead of abstracting away from it and still refreshes/re-renders components in a highly performant manner via DocumentFragments.
We've used the framework fairly extensively at my work because it plays very nicely with our jQuery-heavy legacy code and allows for much easier re-factors.
The observer library has gained a fair bit of interest from other developers (~600 downloads per week via npm) and it'd be great if I could interest others in trying out the framework too. I'd love to hear feedback from anyone who takes the time to try it out. Other contributors would be fantastic.
Re: Bootstrap 5 will remove jQuery as a dependency
#246Earlier 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…
And jquery support often isn't necessary at the moment. It's required for some functionality, but many simpler web pages will work with a slim version of the CSS without any JS. Makes it very light-weight and still easy to set up.
Re: Bootstrap 5 will remove jQuery as a dependency
#247Wait, 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.3…
Re: Bootstrap 5 will remove jQuery as a dependency
#248Earlier quoted context omitted.
Advertisers have abused every single factor possible for tracking, including ETAGs and many other aspects of cache. Don't blame Safari for protecting it's users from disingenuous and dodgy tracking.
A single stable identifier would've solved the whole situation and Apple already had it with Advertising ID. Exposing that to the browser would've been enough so Safari could've been ahead of the curve.
Re: Bootstrap 5 will remove jQuery as a dependency
#249Earlier quoted context omitted.
I would not call Jquery bloated, relative to what is typically found on a website. Some of us still like using it, as the syntax is convenient and functionality reliable. There's an elegance and readability about it that appeals to me more than vanilla JS.
It is bloated compared to using modern DOM methods. jqueery is not needed, its for the lazy and stupid, my opinion.
Re: Bootstrap 5 will remove jQuery as a dependency
#250jQuery is mature and API are solid compared to other frameworks, where you cannot build projects again after just 1 week