Live data from Hacker News

Bootstrap 5 will remove jQuery as a dependency

github.com

201–210 of 333 posts

Re: Bootstrap 5 will remove jQuery as a dependency

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

Safari shards their cache by first party domain, so you don't get that caching benefit there.

Re: Bootstrap 5 will remove jQuery as a dependency

#202

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…

This sounds like the frontend equivalent of, "Docker is irrelevant because the kernel already supports cgroups and namespaces".

Or the Dropbox debut on HN, or the iPod debut on slashdot. Get off my lawn! ;-)

Re: Bootstrap 5 will remove jQuery as a dependency

#203

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…

Well, IE has not been receiving feature updates for over a year. It only receives security patches, and these days only critical ones. It is a dead browser; do not use it unless your job forces you to.

Re: Bootstrap 5 will remove jQuery as a dependency

#204
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 still does a lot of useful stuff. The best advertisement for jQuery, ironically, is this site: http://youmightnotneedjquery.com/ Look at how simple things are in the left column, and how much more code is needed in the right column. jQuery has many convenience features such as chaining, for example: item.addClass('selected').siblings().removeClass('selected'); and you don't have to check for nulls after each s…

I agree. I still use it from time to time when initially hacking together a project. It makes my development process faster and easier. I never have problems with it. The primary concern between start and launch is getting to done, not shaving 20kb or 30kb off (if it was 300kb or 500kb that would be a different matter). As I get to roughly 85%-90% done, or sometimes post launch, I'll then allocate time where it makes sense to removing jQuery and pursuing further optimizations. Eliminating jQuery is toward the bottom of the list of reasonable concerns when it comes to making a new product successful. I have more than two decades of experience with JavaScript, and there are numerous things that are simplified to a point of fast, no concern development triviality with jQuery. If it's useful to your development process, use it.

Re: Bootstrap 5 will remove jQuery as a dependency

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

> Whereas before it was "jQuery for EVERYTHING", now it seems to be the reverse: "remove jQuery from EVERYTHING", which is equally silly. jQuery does a lot of useful stuff

In Bootstrap, it really does very few things. It was an error to begin with to bring the whole jQuery just to do few floating menus.

Re: Bootstrap 5 will remove jQuery as a dependency

#206
post #201

Earlier quoted context omitted.

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.

Safari shards their cache by first party domain, so you don't get that caching benefit there.

Didn't know that. Looks like Safari is continuing it's devolution into becoming the next IE.

Re: Bootstrap 5 will remove jQuery as a dependency

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

I still use jQuery, it still works quite well. IMO it still has a better API for a lot of stuff.

Re: Bootstrap 5 will remove jQuery as a dependency

#208

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?

My sense is that jQuery and early web front-end approaches reflect how designers think. They were created by designers who understood code for other designers who didn’t so that designers could play a role in the web. Sites wanted to be unique.

New frameworks reflect how developers think. Sites want to work more than they want to look unique. In many cases, uniqueness is viewed as driving up training or onboarding cost.

Re: Bootstrap 5 will remove jQuery as a dependency

#209
post #126
post #82

Earlier quoted context omitted.

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.

The cascade was great for HTML in the absence of scope, which is to say in the age of documents. It's a reasonable approach to dealing with all the problems inherent in managing global state. But globals suck. In the age of components it makes little sense to cling to the cascade as if it were more than a means to an end.
Post reply on HN