8 ms·
Bootstrap 5 will remove jQuery as a dependency
- STRiDEX 8y agoIts also worth reading the 4.3.0 blog post which mentions the removal https://blog.getbootstrap.com/2019/02/11/bootstrap-4-3-0/ https://blog.getbootstrap.com/2019/02/11/bootstrap-4-3-0/
- ethagnawl 8y agoThis headline stopped being noteworthy ~4 years ago.
- stayman 8y agoWhich will be ready for February 2022
- tpetry 8y agoAnd Bootstrap 4 will be declared eol so you get no more bugfixes until the bootstrap 5 release. I hope they wont do the same mistake again.
- tcd 8y agoBootstrap 3 got an update last year, and it is already years old. It may have taken a while but at least it got _something_.
- tcd 8y agoI know you're sarcastic but Bootstrap has been picking up steam recently. The jQuery removal has been in the work since 2017. If you want faster releases then feel free to submit PRs :)
- BossingAround 8y agoReally? I'd have guessed bootstrap will be phased out completely by CSS grid, which does essentially what bootstrap does...
- tcd 8y agoRight - so you get all the functionality of bootstrap using CSS grid; all the modals, spinners, buttons, and most importantly: browser bug fixes and quirks people contribute over time. Bootstrap is a _framework_, not just a layout system. Also, BS uses Flexbox at the moment, I doubt they'll go to grid any time soon.
- mattmanser 8y agoPlus a bunch of themes you can just buy, so for many smaller sites you can skip getting a designer involved at all.
- fuzzy2 8y agoHuh? You do realize that the layout utils are but a small part of what Bootstrap has to offer, right?
- mtarnovan 8y agoI'm not sure what you mean.
- bendotero 8y agoI'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.
- runarberg 8y agoIt is not just `display: grid` that is replacing the layout. Now we also have interactive elements in the HTML spec[1] like `<dialog>` and `<details>`. 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.html https://html.spec.whatwg.org/multipage/interactive-elements....
- radicalriddler 8y ago
- diegorbaquero 8y agoWondering, it there any company hiring to work on Bootstrap?
- stayman 8y agoI’ve got a week to burn next week. I might take you up on that
- pweissbrod 8y agoOh no! Some of my sites are still using bootstrap v3! I have so many bootstrap service packs to install, thanks for the heads up.
- petetnt 8y agoYou are being snarky, but hopefully you have installed your Bootstrap Service Packs or at least have checked that you are not affected by some of the XSS issues in versions <3.4 https://snyk.io/test/npm/bootstrap/3.3.7?severity=high&severity=medium&severity=low&policy=open https://snyk.io/test/npm/bootstrap/3.3.7?severity=high&sever...
- dmitriid 8y ago> 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 pain in all of parts of a dev's body as they were 10, 15, and 25 years ago. Even if you "replace" jQuery, you end up just reimplementing easily a half of it just because it's so brilliant in it's ease of use and convenience.
- tcd 8y agoYes...What were you expecting then to do? Usually you replace code if you're dropping a dependency. It's one less network request, saves bandwidth and removes obsolete and pretty much unmaintained code (at this point, the jQuery github is as good as dead, unlikely to see major releases any time soon). Seems to be a sensible approach to me. It's like using native code rather than electron, even if you add more lines, I'm pretty sure the performance gains would be worth while.
- mschuster91 8y ago> It's one less network request, saves bandwidth Given that most stuff these days is packed together with Webpack or at least concat'd together, you don't really save much, plus jQuery in gzip'd form is clocking in at <30 kB anyway (https://mathiasbynens.be/demo/jquery-size https://mathiasbynens.be/demo/jquery-size). > and pretty much unmaintained code (at this point, the jQuery github is as good as dead, unlikely to see major releases any time soon) So what? Software can very well be "done", there is no need to always evolve and evolve. As long as there is no security issue left unsolved, though. In addition, if you're rebuilding half of it on your own anyway, chances are high you'll miss some weird corner case that jQuery solved years, or decades, ago.
- tcd 8y agoI don't agree, software needs to evolve as its dependencies does. In this case we have fetch, async/await, promises and loads more native features that jQuery hasn't adapted to (XHR is obsolete now for example). Why include a dependency that the browser provides for free? jQuery was good before ES6/next came along, these days it's extra cruft. And if what you're saying is true about weird corner cases, people will fix that up in PR's anyway, that's not a reason to stop innovating and just say "meh, jQuery is good enough". Thank god most software doesn't work your way, we'd probably be stuck in the stone ages still.
- brian_herman__ 8y agoWhat do they replace it with?
- entelechy 8y agoThis 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)
- tyingq 8y agoI am still more fond of jQuery's ajax functionality than anything that followed, including the fetch API.
- tcd 8y agoWhy? fetch returns a native promise, which are _much much much_ nicer to work with than XHR ever was or desired to be. Good riddance.
- arve0 8y agoMissing .abort() on safari is one reason. https://caniuse.com/#feat=abortcontroller https://caniuse.com/#feat=abortcontroller
- tracker1 8y agohttps://www.npmjs.com/package/ky https://www.npmjs.com/package/ky
- tyingq 8y agoStraightforward error handling both for actual http numbered errors, and for transport errors (site down/DNS/etc).
- aaaaaaaaaaab 8y agoFor one, fetch() doesn’t support progress reporting.
- nkg 8y agoGood news! I hope it won't be replaced with a 2.0 MB bootstrap.min.js
- k__ 8y agoProbably not, they remove it because they drop IE support, so they have much less edge-cases to worry about.
- ptspts 8y agoDo they have some remaining Edge cases?
- nikeee 8y agoThat will become Chrome, so don't worry.
- SmellyGeekBoy 8y agoAnyone who lived through the IE6 days has every right to be worried about a diminishing number of browsers / rendering engines.
- k__ 8y agoDo you use Bootstrap? If yes, what version? If not, why not? Which alternative do you use?
- diegorbaquero 8y agoUsing it, 4.1.1 through bootstrap-vue in my nuxt app. Alternatively using Material through vuetify in other projects too.
- petepete 8y agoI like Bootstrap but I tend to use Milligram for most stuff these days. It's an excellent starting point and easy to extend. https://milligram.io https://milligram.io
- radicalriddler 8y agoI guess the main difference being that Bootstrap is actively maintained while Milligram hasn't been updated in 2 years.
- GordonS 8y agoLooking at the GitHub page[0], the last commit was 2 weeks ago, not 2 years ago. [0] https://github.com/milligram/milligram https://github.com/milligram/milligram
- petepete 8y agoI agree not much happens development-wise, but the project is so small and simple it doesn't need it. All of the modules are tiny and easy (even for me) to understand.
- Daegalus 8y agoI was looking at the milligram site and it looked oddly familiar. Seems http://getskeleton.com/ http://getskeleton.com/ uses the same layout for their main page demoing the framework.
- kpcyrd 8y ago
- lichenwarp 8y agoCan 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?
- guhcampos 8y agoNot 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 rendering. It seems to be extremely more efficient and flexible.
- mosdl 8y agoshadowdom is actually the opposite - inflexible and a memory hog. It just allows people to be lazy
- barbecue_sauce 8y agoI 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.
- peheje 8y agoVirtual Dom faster than direct manipulation? Source please.
- acdha 8y agoYou’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.
- arp242 8y agoThis 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 work. In other words, this entire effort seems of dubious benefit to me. 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, and al things considered remains a pretty neat project. It shouldn't be used for everything, but spending loads of time in removing it just because it's no longer the kwel fr4m3wr0k of teh week just seems like a waste of effort.
- miohtama 8y agoIE itself is being "dropped" as well, so long term support commitment for new products does not make sense.
- Someone1234 8y agoYou 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 Explorer 10: EOL January 31, 2020 - Internet Explorer 11: EOL Unknown/Unannounced IE11's EOL date is currently unknown. It would be at minimum 2025 based on Windows 10's current extended support date (but each Windows 10 feature release with IE11 pushes that date back).
- tcd 8y agoIE 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.
- sneakernets 8y agoPeople who say jQuery is slow, never used YUI in its heyday. That abomination deserves nothing but a shallow grave.
- samgranieri 8y agoI had to use ext-js. Ugh.
- vinimk 8y agoi'm migrating a project away from extjs right now, feel your pain
- csours 8y agoHaha, I started and implementation of a map with YUI back in the day. On IE6.
- SmellyGeekBoy 8y agoHaha, wow. That triggered my webdev PTSD. At least nobody mentioned Classic ASP.
- runarberg 8y agoThis 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 `<dialog>` and `<details>`. And for reusable components, we have custom elements, that you can either implement your self (not that hard) or pull from a library (using javascript modules). Really the only reason I see anyone using CSS frameworks like bootstrap is for quick prototyping or because that is what they know and don’t bother picking up the new standards (which is ironically where jquery was a few years ago).
- benbristow 8y agoBootstrap provides an easily customizable (through SASS/LESS variables) base for a web project and the components are very useful. You can even pick/choose components now to keep it more barebones if you wish. It's also very easy to learn. All the utility classes are useful too. Why waste time creating all those components manually? Also as you say it's still great for prototyping and internal applications that don't need bespoke styles.
- noir_lord 8y agoThat’s the way I use it already without jquery. It’s just nice clean flexible sass to start from. I prefer a 24 col grid as well which takes about 4 lines of sass.
- fenwick67 8y agoBootstrap 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.
- Scarbutt 8y agoHave you seen all the CSS for simple stuff like a button and for other handy components? I don't want to write all that just to make a pretty button unless your job is doing only HTML/CSS.
- petetnt 8y agoLong-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 updates at this point seem to be harder than rebooting the whole thing writing everything from scratch, maybe even using things like CSS Grid and friends in the background. All the best to the current maintainers in their pretty hard task! [0] https://github.com/twbs/bootstrap/issues/19017 https://github.com/twbs/bootstrap/issues/19017
- rckclmbr 8y agomaterial-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.
- rc_kas 8y agoI have no idea how to do anything without jquery.
- cmg 8y agoThis is a great opportunity to learn! http://youmightnotneedjquery.com/ http://youmightnotneedjquery.com/ is a great resource: Type in what you want to do (for example, `next` or `AJAX`) and it shows the jQuery code you might have used along with a vanilla JavaScript way to accomplish it.
- anthony_doan 8y agoIs me or the website shows that the in general jQuery codes are much smaller? Like the $.getJSON jQuery code seems much compact compare to IE8+ to IE10+.
- martin_a 8y agoDidn't knew that site before, but had a look at it and now I'm pretty sure I will stick to jQuery and not the shiny new things. It's still very solid and gets things done.
- h1d 8y agoI thought the site's name was a sarcasm until I read their intro paragraph which makes me laugh that they're actually encouraging the use of jQuery with those examples.
- trumped 8y agonice to see... most javascript libraries are not really that useful nowadays... not sure if bootstrap is still useful either though...
- dstroot 8y agoI’ve been using Bootstrap styles with React and rebuilding the “active” stuff like modals, navbar, etc. as needed. It’s been pretty painless. I looked at reactstrap, etc. but I’d rather stay clear of unnecessary dependencies.
- kojackst 8y agoReactstrap is cool, but you basically need to re-learn bootstrap. For every component you are using, you need to check their documentation to see if they came up with an attribute for that or if you can use bootstrap classes. It does improves readability, but doesn't pay off IMHO.
- galaxyLogic 8y agoThis is absolutely good. If they don't need JQuery why should they package it together with Bootstrap. The only reason to use JQuery would be if you need it :-)
- z3t4 8y agoIsnt IE still the default browser in windows 7,8 and 10 !?
- ezequiel-garzon 8y agoIn Windows 10 at least it's Edge.
- diafygi 8y agoWe've had great success with the bootstrap-native fork (same css, different vanilla javascript). It's super lightweight, fast and the css is just as customizable (since it's unchanged from normal bootstrap). I look forward to getting something similar in the mainline :) https://github.com/thednp/bootstrap.native https://github.com/thednp/bootstrap.native
- throw2016 8y agoIts only a matter of time before people realise their time is valuable and there is pushback against the frenzied cult of complexity driven by resume builders, framework builders and job seekers always looking for an opportunity to promote their latest projects and run everything else down. jQuery remains as useful as ever and the constant sniping here is a dead giveaway of a faddish mindset of not just making one's own choice but trying to force it on others. Fortunately for those who do not have hours and weeks of time navigating NPM dependency wildlands, jQuery represents a quick and efficient escape. If Vue or React offer better efficiency or simpler use, users will migrate swiftly but given the current state of affairs that seems unlikely, so they can coexist serving different use cases. The idea that React or Vue can or should replace jQuery is more wishful than real given 90% of jQuery use cases are for websites and ajax calls that would not benefit from the massive overhead of a shadow dom and NPM workflow.
- baroffoos 8y ago>90% of Jquery use cases are for websites and ajax calls 90% of what people used jquery for now is built in to browsers by default. Every dependency removed from your website is a win.
- martin_a 8y ago> Every dependency removed from your website is a win. Sorry that this rant is hitting you, it's nothing personal, but this is somewhat a distraction. Deliver the slim version from your own host and with an existing HTTP connection and it's just 70 KB without compressed transfer. That's very little, even on mobile. People are regularly missing to optimize images and will easily transfer 100s of KB in image overhead on their sites, but they cry out for jQuery? Or throw in a bunch of analytics stuff which gets you set back a significant amount of time and connections... Really: Using jQuery is one of the smallest problems of modern web development.
- baroffoos 8y agoIts not just the bandwidth spent its the extra complexity of the code base. Every framework you add is an extra thing that devs have to know and in the future there will be less and less people who know jquery.
- jmkni 8y agoAwesome! 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.
- chiefalchemist 8y agoAnd 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.
- jmkni 8y agoReminds me of the very old Joel Spolsky blog post, Fire and Motion - https://www.joelonsoftware.com/2002/01/06/fire-and-motion/ https://www.joelonsoftware.com/2002/01/06/fire-and-motion/ > I noticed how almost every kind of military strategy, from air force dogfights to large scale naval maneuvers, is based on the idea of Fire and Motion. It took me another fifteen years to realize that the principle of Fire and Motion is how you get things done in life. You have to move forward a little bit, every day. It doesn’t matter if your code is lame and buggy and nobody wants it. If you are moving forward, writing code and fixing bugs constantly, time is on your side. Watch out when your competition fires at you. Do they just want to force you to keep busy reacting to their volleys, so you can’t move forward? Still as relevant as ever.
- skizm 8y agoI assume I can still use jQuery in conjunction with v5 of Bootstrap, right? I just don't need it now?
- dagoat 8y agoI always wondered, back when zepto got some traction, if we'd see it become fully compatible with Bootstrap. Then there's always: https://github.com/thednp/bootstrap.native/ https://github.com/thednp/bootstrap.native/ (which I've not used), but appears to remove jQuery as a dependency
- AndyKelley 8y agoWait, 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/ 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/ https://ziglang.org/), which has a dependency on... nothing! With cache off, 54.36 KB / 50.08 KB transferred. Cache on: 54.36 KB / 0 B transferred. No JavaScript.
- btian 8y agoIt's possible to get CSS only Bootstrap.
- IloveHN84 8y agoSad about this. Would do still 100% jQuery projects instead of React ones jQuery is mature and API are solid compared to other frameworks, where you cannot build projects again after just 1 week
- aussieguy1234 8y agoI use JQuery on the backend https://www.npmjs.com/package/cheerio https://www.npmjs.com/package/cheerio
- thatgerhard 8y agoDo people still use bootstrap? I found it way too much bloat for something that doesn't add that much value. I don't think it has a place since flexbox became a thing. Coding something from scratch is just so much quicker now.
- simonhamp 8y agoWhy do so many web developers hate jQuery? https://link.medium.com/ehNSiPGNgU https://link.medium.com/ehNSiPGNgU
- h1d 8y agoJust like 'everyone' that hates PHP. Trying to look like they're ahead of the average by thinking the good old stable tools are obsolete.
- T3RMINATED 8y agoRIP Bootstrap.
- fattypouch 8y agoIMO, good. The dependencies causes noobies loads of trouble, making it hard to scale to market. Also, since everything is written in Javascript now, the more vanilla you can get, the better.