9 ms·
I wonder if I can get more web developers where I work back in the bootstrap camp now. Use of jQuery was their main complaint and reason for abandoning. On a
by SkyBelow 6y ago
I wonder if I can get more web developers where I work back in the bootstrap camp now. Use of jQuery was their main complaint and reason for abandoning.
On a related note, I feel like I'm officially becoming an old fogy because I learned web development with jQuery but never did enough to experience the pains it brings that newer frameworks do away with, and as such I still feel drawn to using jQuery, especially when I want to throw together a smaller websites.
- jasonhansel 6y agojQuery does still have a place for smaller websites IMHO. I really wish Intercooler (http://intercoolerjs.org/ http://intercoolerjs.org/) had caught on more for such uses.
- xellisx 6y agoThere is also Cash JS.
- pcardoso 6y agoThe author of Intercooler has a new project https://htmx.org https://htmx.org
- brylie 6y agoDang. The documentation links don't seem to work on Firefox Mobile.
- DangitBobby 6y agoThat's strange. They work for me on Firefox Preview
- tapvt 6y agoI’m very excited to find this. I have a handful of projects in my pipeline that require “just enough” of the dynamic sugar that this could potentially provide for little investment of time.
- andybak 6y agoI did my last small project with vanilla js and the ugliness of the native APIs reminded my how lovely jQuery is. Do the maths - if the file size isn't a problem then go for it. Life's too short to be the victim of fashion.
- jka 6y agoAlthough jQuery does seem less popular as a choice for new projects nowadays, I'd like to chime in to agree here (not to knock Bootstrap; it's good that they're staying current with their developer ecosystem). Given appropriate element names and classes, jQuery and CSS selectors can provide a straightforward and readable way to express application behaviours, and it's a well-proven and stable project at this point.
- CryoLogic 6y agoThere is very little functionality JQuery offers that the modern browser DOM API doesn't provide with more robust performance.
- jfkebwjsbx 6y agoYes, but the native APIs are a PITA.
- chrisweekly 6y agonot like they used to be, youngster* * veteran of the original browser wars
- Widdershin 6y agoSo is jQuery imo, especially the nonsensical argument order for iteration.
- deleted 6y ago[deleted]
- atorodius 6y agoI‘m new to frontent development. I had a lot of fun with jQuery so I‘m wondering: What‘s the problem with it? Do people now ise vanilla JS?
- scrollaway 6y agoIt's an unnecessary dependency for those using different frameworks. Its imperative model is also very incompatible with the reactive model that's becoming more common in frontend (React etc).
- irrational 6y agoIf you are using a framework/library like React, Vue, Angular, etc. then the need for jQuery goes away. However, the number of websites where a full-blown library like React is the right tech stack is probably less than 5%. For everyone else you would want to use vanilla JS, though if you are already familiar with jQuery I don't think there is anything wrong with using it. The funny thing is I spent years using jQuery and have also used Vue.js, but I'm just so tired have having to deal with importing libraries, setting up build systems, etc. that 9 times out of 10 I will just use vanilla HTML/CSS/JS and call it a day. It is just so much simpler. YMMV
- c1b 6y agoIn which situations is React unsuitable? I learned web development starting with React and have been using it for everything since.
- jfkebwjsbx 6y agoReact is meant to simplify application development, specially suited for single-page apps (SPAs). For a normal/small website, there is no need for a framework like that which adds unneeded complexity.
- baddox 6y agoReact is also well-suited for a single highly-interactive module on an otherwise non-React website. Of course, you still need to consider JS code size and loading performance, but it would often be completely reasonable to use React for, say, a very complex interactive form or table of data on your otherwise static Rails website.
- ReptileMan 6y agoWhat is the problem with jquery exactly? What is a person that hates the reactive frameworks with a passion to use nowadays?
- memexy 6y agoWhat is wrong with reactive frameworks?
- freehunter 6y agoI dislike having to write a separate front-end and back-end and worry about APIs and JWTs and security and Redux and multiple servers coupled with isomorphic React being more pain than it's worth when I could just as easily not use React. I'd use React on every project if I could run it like a Rails front-end instead of needing to write distinct server and client side applications.
- terandle 6y agoHave you looked at next.js? It allows you to write your server side database access code/etc in the same place as your react client side app. Pretty neat, however I personally would rather write my backend code in something better than JS so I don't go that route.
- memexy 6y agoNot sure I follow. Reactive frameworks includes more than React. Reactive frameworks generally mean some form of observables, observers, and mechanisms for linking the two together via a dataflow graph, e.g. http://reactivex.io/documentation/observable.html http://reactivex.io/documentation/observable.html. > This page explains what the reactive pattern is and what Observables and observers are (and how observers subscribe to Observables). Other pages show how you use the variety of Observable operators to link Observables together and change their behaviors. I'm not familiar with React so I'm not sure how all these concepts are implemented in React.
- c17r 6y agoLook into InertiaJS. Svelte/Vue/React become just the UI piece and everything else (routing, validation, etc) is handled server side
- ma2rten 6y agojQuery solved the problem of browser compatibility and hard-to-use browser APIs. However browser api have improved a lot, with new apis sometimes modeled after jquery, and browser compatibility is much less of an issue. There is really isn't a reason to use jQuery over just vanilla javascript anymore. I don't think it makes sense to use React and friends unless you are building Single Page Applications.
- ericwood 6y agoIt's not so much the pain it brings, so much as the fact that a lot of the original inconsistencies and querying it was invented for are either gone or integrated fully into the native APIs. http://youmightnotneedjquery.com/ http://youmightnotneedjquery.com/ illustrates this fairly well! After working with more modern JS and the pure browser APIs on larger non-trivial projects I can't say I've ever felt the need to reach for jQuery the way I used to in its heyday. I'd be hesitant to refer to jQuery as a framework, as I don't think it fills the same void as what we commonly think of as a "javascript framework" does; it was more a utility for querying and mutating the DOM. It doesn't provide answers for questions like "how do I handle state?" or "how do I convert state into DOM?", although it does give you some tools to answer those questions yourself.
- methodin 6y agoAgreed. I think people do tend to forget jQuery's primary use and greatness came from masking browser inconsistencies and exposing things that just weren't even possible with vanilla JS. Necessity for that type of thing has waned but someone coming into jQuery now or in the last couple years I could see the disdain if they weren't around when making your JS work in all browsers was ridiculously hard and time-consuming. It was a very, very good and useful segue tool that has run its course.
- ravenstine 6y agoThat was one of the biggest reasons I abandoned it. But also, since Bootstrap, a lot of competition in that space has popped up, and there's less of a need to buy in to everything that Bootstrap comes with, or any particular frontend library for that matter. These days, I don't know if I would use Bootstrap again unless there were parts I wanted to harvest from it.
- mmgutz 6y agoMost front end folks that I've spoken with didn't like the jQuery dependency not because it was huge or old but because jQuery does not play nice in a component world (React, Angular, Vue ...). Bootstrap 5's custom Javascript solution will unlikely change their view. With that said, there's a lot to like in Bootstrap 5 to quickly throw together a site.
- rorykoehler 6y agoI have found that vanilla js is now cleaner than jquery for all my use cases.