Live data from Hacker News

Bootstrap 5 will remove jQuery as a dependency

github.com

181–190 of 333 posts

Re: Bootstrap 5 will remove jQuery as a dependency

#181
post #137

Earlier quoted context omitted.

A good replacement selector engine: `const selectorEngine = selector => Array.from(document.querySelector(selector));` :)

It needs to be querySelectorAll, and you need to handle cases where it returns null as well.

Darn, that's what you get from typing on mobile. Ment to use querySelectorAll originally. But apart from null handling (which can be solved using `|| []`), what else would be lacking? I used a similar version of this for a few projects a while back, with some additional stuff for query context and ID selector -> getElementById I think, but that's basically it...

Re: Bootstrap 5 will remove jQuery as a dependency

#182
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 is still maintained. The last pull request was 2 weeks ago. Remember that this is a _mature_ project and as such doesn't need the plethora of pull requests everyday. Personally if you are spending all that time and energy recreating the wheel just to say "you don't use JQuery ", you're being an idiot and might as well just use JQuery. Seriously I wonder how much they actually spent in dollar hours on this pull…

By that logic JQuery users/devs were idiots for recreating the wheel. I smell a jqueery fanboi and it stinks to high heavens.

Re: Bootstrap 5 will remove jQuery as a dependency

#183

Long-ish time ago I tried to modularize and modernize Bootstrap [0] to be easier to use with the (still) current way of development and needless to say it was hard, very hard. In the meantime challengers like Bulma, Semantic UI and Material and Material UI have risen to challenge, with the added benefit of being written at least partly from scratch (again). I still think that Bootstrap has it's uses, but incremental…

material-ui is hands-down the most fantastic UI library I have used (both in company and out). They provide a solid base set of features, balance convention over configuration well, docs are excellent, and the styling/themes are a nice thing to build on. I do wish the third-party themes would grow as large as bootstrap did though.

Re: Bootstrap 5 will remove jQuery as a dependency

#184
Awesome!

I love bootstrap. I know it's not as cool these days, but it still lets me put together a passable (albeit generic) UI quickly, to present whatever it is I'm actually trying to do to the user in a way they will recognise.

I don't want to spend my time building all of that myself, of learning a UI framework, I want to spend it building functionality, and then using Bootstrap (which I know like the back of my hand at this point) to present the functionality.

Re: Bootstrap 5 will remove jQuery as a dependency

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

That’s a legitimate decision responding to their environment – you might disagree because you have different goals and resource levels but it’s wortb understanding why not everyone makes the same call.

Re: Bootstrap 5 will remove jQuery as a dependency

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

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.

Polymer or the more light-weight LitElement.

Re: Bootstrap 5 will remove jQuery as a dependency

#187

Earlier quoted context omitted.

JQuery is still maintained. The last pull request was 2 weeks ago. Remember that this is a _mature_ project and as such doesn't need the plethora of pull requests everyday. Personally if you are spending all that time and energy recreating the wheel just to say "you don't use JQuery ", you're being an idiot and might as well just use JQuery. Seriously I wonder how much they actually spent in dollar hours on this pull…

By that logic JQuery users/devs were idiots for recreating the wheel. I smell a jqueery fanboi and it stinks to high heavens.

When the wheel is prone to damage from small bumps, and can't handle off-road, a new stronger reliable wheel that handles all terrain is needed. That's what Jquery offers.

Re: Bootstrap 5 will remove jQuery as a dependency

#188
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 is still maintained. The last pull request was 2 weeks ago. Remember that this is a _mature_ project and as such doesn't need the plethora of pull requests everyday. Personally if you are spending all that time and energy recreating the wheel just to say "you don't use JQuery ", you're being an idiot and might as well just use JQuery. Seriously I wonder how much they actually spent in dollar hours on this pull…

Not only are you recreating it, but your universe of users is smaller. Love it or hate it jQuery is being battle tested day in and day out by __a lot__ of sites and site visitors.

Sure there's some baggage. There's always some trade off somewhere, isn't there. But if things working is a priority then jQuery isn't such a bad thing.

Re: Bootstrap 5 will remove jQuery as a dependency

#189

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?

Not a total expert, but as a fan of JQuery I've read the arguments. JQuery modifies the DOM at runtime, this means lots of node traversals and redrawings on the fly, which make it nearly impossible for the Javascript engine to optimize anything. More modern frameworks in general use the concept of a Shadow DOM: they keep their own representation of the DOM internally and only send the full frame to the engine for ren…

You’re confusing the shadow DOM with the virtual DOM and if you benchmark it, the only way the virtual DOM is faster is if you’re doing a bunch of horribly inefficient interactions. I usually find the DOM to be faster by several orders of magnitude because ultimately the real DOM has to be updated so any overhead is going to be on top of the same work.

That’s not saying don’t use a virtual DOM but pick it knowing that you’re taking on a moderate degree of inefficiency in exchange for a better coding experience, consistent structure, etc.

Re: Bootstrap 5 will remove jQuery as a dependency

#190
post #184

Awesome! I love bootstrap. I know it's not as cool these days, but it still lets me put together a passable (albeit generic) UI quickly, to present whatever it is I'm actually trying to do to the user in a way they will recognise. I don't want to spend my time building all of that myself, of learning a UI framework, I want to spend it building functionality, and then using Bootstrap (which I know like the back of my…

And that's why it's called Bootstrap. If only more people understood why that matters. You're moving forward with the application while they're wasting time trying to reinvent a wheel, a wheel that has little to do with getting an MVP in front of your audience.
Post reply on HN