Live data from Hacker News

Bootstrap 5 will remove jQuery as a dependency

github.com

71–80 of 333 posts

Re: Bootstrap 5 will remove jQuery as a dependency

#71
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 wouldn't say it's unmaintained. There have been more issues closed than opened in the last month. I would just say there isn't much interest in it anymore.

Re: Bootstrap 5 will remove jQuery as a dependency

#72

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…

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.

Re: Bootstrap 5 will remove jQuery as a dependency

#73
post #40
post #14

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

Missing .abort() on safari is one reason. https://caniuse.com/#feat=abortcontroller

https://www.npmjs.com/package/ky

Re: Bootstrap 5 will remove jQuery as a dependency

#74

Earlier quoted context omitted.

For one, fetch() doesn’t support progress reporting.

I'm not particularly familiar with fetch, but does this do what you want? https://github.com/SitePen/javascript-streams-blog-examples/...

This is a hack that works only for downloads via streams. It won’t work e.g. for file uploads (unless you read the file into memory first, which is highly undesirable).

Re: Bootstrap 5 will remove jQuery as a dependency

#75

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.

I believe Vue.js is much better option for this use case (just enhancing UX on an existing HTML page), and is similar in size while giving you much more flexibility.

Re: Bootstrap 5 will remove jQuery as a dependency

#76
post #55
post #10

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.

You should look at `for await ... of`[1]. You can get a streaming reader from a `fetch` response and loop if through an async iterator. If you prefer the functional syntax observables, I'm sure you can find a library that wraps async iterators as observables.

[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Re: Bootstrap 5 will remove jQuery as a dependency

#77
post #17

Do you use Bootstrap? If yes, what version? If not, why not? Which alternative do you use?

Used to use it a lot (v1-v4 even) ... lately mostly material-ui with React.

If I need something quick/dirty, I'll pull in jquery and bootstrap via cdnjs and roll with it.

Re: Bootstrap 5 will remove jQuery as a dependency

#78

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…

I'm not sure security patches to ensure a program is not dangerous to use is quite the same thing as "supported". I mean, yes, it technically is in a sense of the word, but it's not meaningful.

Microsoft is telling everyone to not use IE11. They are not adding features to IE11, or fixing (non-security) bugs. While it is the only browser shipped with LTSB, Microsoft's position is that no one should be using LTSB on general-purpose machines anyway. (Mind you, LTSB works and is wonderful, but Microsoft would prefer you don't know that.)

Re: Bootstrap 5 will remove jQuery as a dependency

#79
post #54
post #50

Earlier quoted context omitted.

I build very simple websites, I'm using a tiny bootstrap subset that's sufficient for what I do. My css files average around 400-1100 bytes of unminified css.

Custom Bootstrap builds then?

cannot speak for GP, but often when I did use bootstrap, I'd have sass configured in webpack, and bring in the bits I wanted (prefixing my overrides). Usually copy/paste the variable.scss directly into my project, as well as the full list of modules, commenting out the ones I wasn't using.

Re: Bootstrap 5 will remove jQuery as a dependency

#80

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

So, where's the equivalent one stop shop for someone building an admin interface using these new features? Don't think uber.com - think admin.startup.com .

(Personally, I'd rather they just build it in Lazarus, but people have forgotten about building desktop apps.)

Post reply on HN