Live data from Hacker News

Bootstrap 5 will remove jQuery as a dependency

github.com

91–100 of 333 posts

Re: Bootstrap 5 will remove jQuery as a dependency

#91
post #6

> Bootstrap 5 will remove jQuery as a dependency ... by copying over/rebuilding big chunks of it. - $(element).closest(`.${ClassName.ALERT}`)[0] + SelectorEngine.closest(element, `.${ClassName.ALERT}`) - $.Event(Event.CLOSE) + EventHandler.trigger(element, Event.CLOSE) - $(element).one( ... ) + EventHandler.one( ... ) - $(this).data(DATA_KEY) + Data.getData(this, DATA_KEY) And so on and so forth. DOM APIs are just as…

jQuery was nice in that everyone used it for a long time, it was required during browser inconsistencies and no transpiling. This made systems common for devs, and systems/skills were more transferrable without worry about browser testing hell.

Now every framework will use a different internal jQuery like custom system, when these pile up high enough another jQuery like library will appear that everyone will use if browsers start fragmenting again. Though with WebAssembly and other technologies maybe less of that will be restrictive enough to need common browser baseline libraries.

jQuery was very required during IE/Firefox/Chrome changes and made a baseplane of support that didn't need to be tested in every browser by every project, devs could just focus on building their webapp. It is a bit similar to a game studio making a custom engine or using a common one like Unity or Unreal, there are pros and cons of both, but the pro is the devs can focus on building a game and not having to worry as much about the engine.

Now that browsers and transpilers exist, that is less of an issue but also leads to many more versions of the same thing, for better or worse.

I just hope that most projects aren't bogged down in extra work and testing recreating jQuery for the thousandths time. That is one problem I see with javascript ecosystem today is that lots more work goes into the tech rather than your app/game/project/product. While it is simplifying in some areas, sometimes it can actually add complexity to your tech stack that is unnecessary and wastes cycles that should be on your product.

Re: Bootstrap 5 will remove jQuery as a dependency

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

> As one of the commenters pointed out, a lot of stuff was copied from jQuery to make it work.

"a lot" is an important clarification there, though. If they copied 99% of jQuery over then yes, it's a total waste of time. But 5%? 10%? That's a meaningful reduction in download size.

Re: Bootstrap 5 will remove jQuery as a dependency

#93

Earlier quoted context omitted.

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

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.

Re: Bootstrap 5 will remove jQuery as a dependency

#94

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 jQuery is a good option if you're making "rich applications"; that is, normal HTML pages with some JavaScript for better UX. For many applications this is still a good approach. If you're making an SPA, then jQuery is a bad choice for many reasons. jQuery is just a DOM wrapper, and doesn't give you any application structure, which tends to lead to pretty messy applications.

jQuery is fine for spicing up a blog or something with really basic JavaScript functionality (e.g. a carousel, basic 'contact' form with validation/AJAX).

Anything more 'rich' gets confusing very, very quickly and with how accessible Vue/React/Angular are it doesn't make sense to use jQuery.

Re: Bootstrap 5 will remove jQuery as a dependency

#95
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 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 request.

Re: Bootstrap 5 will remove jQuery as a dependency

#96

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…

I think you may be confusing Shadow DOM with Virtual DOM. Shadow DOM is more about encapsulation and isolation of independent DOMs, while Virtual DOM is about keeping an in memory representation of the DOM to allow for more efficient rendering. Shadow DOM is a browser API whereas Virtual DOM is implemented in frameworks.

Re: Bootstrap 5 will remove jQuery as a dependency

#97
post #81
post #72

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

Windows 7 will be unsupported next year.

Yes. MS still intends to ship their new browser on Windows 7 since it'll be like any other browser you can install...

Re: Bootstrap 5 will remove jQuery as a dependency

#98

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 is still super useful if you need something to look "pretty good", and want to build it fast. It's great for internal tools, protoypes, personal use, or even B2B software that just needs a functional design.

If you're building Facebook, yeah maybe it's not so useful.

Re: Bootstrap 5 will remove jQuery as a dependency

#99

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)

[deleted]
Post reply on HN