Lots of us are still using it for one reason or another. How about you? What's your story?
Lots of us are still using it for one reason or another. How about you? What's your story?
For further actions, you may consider blocking this person and/or reporting abuse
shrey vijayvargiya -
Pavol -
Abdussalam Mujeeb-ur-rahman -
sameer -
Oldest comments (98)
One word. "Legacy"
jQuery shines the medieval era of web development.
This is the most accurate way to describe those times.
last time I used it & d3.js 🤣🤣🤣
RandomFractals / droneStrikes
Data viz of US drone strikes in the Middle East
droneStrikes
Spatial Data Viz of U.S. drone strikes in the Middle East
dronehits.herokuapp.com/
Graph View
Data View
Please also add #jokes tag
👎👎👎
Not regularly, but I have use jQuery. Mainly where I have a simple web app (A few pages without much logic in them, just showing some content). Going with React would be too much a hassle (You have to maintain consistency within the global state). And the few times I had to work on a Wordpress site (I guess they are why jQuery still have this usage)
I use it on daily basis, cause of my current job.
The past 6 months I've been not been using it when I'm not coding in a framework. A lot of things that I thought would be easier aren't that bad in es6.
Though
$(selector)
will always be nice ... I really don't like thedocument.querySelectorAll(blah).forEach((eachselector) = { so much for something small });
blah
To be honest, I have no idea if this is an good idea but...
Does save a lot of keystrokes on an daily basis and because of the double $ most people would at least think of jQuery and thus that it is some sort of selector.
I saw a talk by Wes Bos at JAMstack conf where he did exactly this. Actually he implemented
$
forquerySelector
and$$
forquerySelectorAll
I think this is a pretty neat trick, but there's a part of me that always wants to pause and analyze whether it is strictly necessary to expand on the window object needlessly. Do you have any opinions on setting this as a part of the window object vs using a separate function to do this?
You can always just make your own function called
$
:)This is how my utility looks like for that:
I even export it as
$
because i got so used to it ;-)))I should note that it always returns an array, so no matter if it returns one element or multiple, you can still have one code to iterate matching elements. And if you need only one because you know there will be only one,
[0]
saves the day, just like in jquery unwrapping method.That's pretty nifty!
I made a slight adjustment that will save you the trouble of having to add [0] to the array if there's really only one instance of that selector.
I had it in previous version, but i value having returned array much more than this. Because i often map, i can safely map over array of one element, but it would throw if i dont have it inside the array. Im huge advocate of that.
What's jQuery?
I'm using it in new development right now and there's nothing you can do to stop me!
But, why?? xD
It's a traceability and logistics platform using event sourcing in Postgres to maintain manufacturing, siting, and troubleshooting histories. The database and backend API are the important parts, while the web application is only one of several points of interactivity or interoperability. And releasing a functioning piece of software was/is more important than keeping up with the client-side Joneses, so to speak: this is essentially a one-woman production, and I don't have time to get as good with newer frontend techniques as I am with the stuff I've been working with since last decade. jQuery, server-rendered templates, and REST did the job well enough then and they do the same now!
Spot on. :)
But to learn jQuery and check its documentation is much harder (in terms of time spending) than just use the Programming Language itself - JavaScript.
You don't need to learn any of modern techniques, you just need to know how to use the language without additional abstractions.
There is still the cases where doing something with JS harder than jQuery, but not so many.
I recommend to check youmightnotneedjquery.com/
Everything you've said is true! However, I do not need to learn jQuery, having learned it many years ago, and practically never need to reference its documentation since I'm not doing anything fancy with it. I am aware of
document.querySelector
and other such native functionality having become more generally available. I've used some of it in other projects where I was working with other people who knew this stuff well enough to make the call that we could do everything we needed without jQuery and ignore browsers that couldn't keep up.I am not those people. This project might not need jQuery -- I would go so far as to say there's a good chance it doesn't -- but I'd much prefer to be consistent about using jQuery than the alternative.
Hahahahaha... This one got me.
I'm learning Jquery in 2020! Hmmm..YEAH!
I refactored a jQuery project to vanilla a few weeks ago.
Working with e-Commerce software has you using jQuery frequently as well. The ecosystems of Magento and Shopware for example have deep roots in jQuery.
Also, there's still a reason for jQuery. Sometimes, it fits just right into a project. Especially medium sized projects that are not expected to grow a lot could benefit from a smaller bundle size compared to what babel and webpack wrap up sometimes.
Also, what even is a legacy codebase? Lots of small business pages are made well before 2015, when es6 was finalized. For most pages it's just not feasible to adapt a new codebase every 5 years, hence Bruce's "shocking" statistics. I wouldn't call jQuery based projects "legacy" for the sake of jQuery.
I use it on a legacy client application. It still works and there isn't a huge benefit from trying to replace it. There are much bigger issues to address with the application before trying to replace jQuery. I try to promote using plain JavaScript on newer development in the project but some developers are more familiar with jQuery, which is okay. Even though JavaScript has caught up to jQuery, I still think jQuery's syntax and functions are more convenient to use.
Precisely my situation. There are many, many other things I would want to improve in the application I am working on before I even think about touching something that although old, still works just fine
Im glad you are taking this practical approach. I think you should always prioritise improving the product functionality for the user over refactoring the code for the sake of it. Keep up the good work
Too many people are so eager to jump on the jQuery hate bandwagon. I'll say it - I STILL USE JQUERY.
Why?
With that said, I do use it sparingly and when I do, I make sure to indicate that a variable is pointing to a jQuery object:
I still use JQuery for all of the same reasons 😅 I work at a non profit that caters to an older demographic so IE support is a necessary evil.
At least the first point you can change with Babel :)
Only for Bootstrap, thats all 😅
Some comments may only be visible to logged-in visitors. Sign in to view all comments.