DEV Community

Ben Halpern
Ben Halpern Subscriber

Posted on

Anybody still working with jQuery?

jQuery was the dominant library in front end web development not too long ago.

The industry has largely moved on from jQuery for greenfield projects, but I’m sure plenty of folks are still maintaining jQuery projects.

So I’m curious to hear about your use cases and plans for the future.

Top comments (72)

Collapse
 
smonff profile image
🌌 Sébastien Feugère ☔ • Edited

Assuming that people doing jQuery are maintaining legacy code is not necessarily right.

In my company, there is no people trained on modern front-end ecosystem (and they do not want to learn), and the only thing they know is a bit of jQuery. More than this, the main proprietary business tool they use (a survey program for online surveys) makes an extensive use of jQuery.

Being the only developer in the team I had to think what to do when they asked me to develop a new module for this tool. I did integration tests with React and the result was bad: the host tool is fully based on jQuery and it's DOM is based on a visible layer plus an invisible layer, what makes impossible to integrate, for example a React virtual DOM in it without messing up badly with the whole thing and write awful code.

After considering this, I decided to use jQuery and I am happy with it. I integrated it with a simple client side templating system and some other modern tools (transpiling, etc.) and I think we delivered a very strong product.

Depending of the situation jQuery can still be the good choice and I actually think that in some situations, choosing tools that are not adapted to your use case only because they are the de facto trendy ones can be harmful.

By the way, I tend to think that jQuery still is the dominant front end library in use (I have no source for this assumption though). People who say « it is sad [they] still have to use jQuery» in their legacy project makes a mistake because if you use jQuery in a modern way, it is totally possible to create some maintainable code, refactor old code using modern practices and make your life easier.

Remember jQuery is only a tool among other and that the new tools like Vue, React and Angular benefit of a powerful hype those days that tends to make us think that old tools are not good anymore: but those are only tools. It's still up to you to do something good or bad with them.

Why I'm still using jQuery in 2019

Collapse
 
israelmuca profile image
Israel Muñoz

I wholeheartedly agree with your post.

Actually, some people who have seen the code for my jQuery project expected a mess of spaghetti code, which is not at all!
I told them spaghetti code is not framework exclusive, nor a jQuery requirement.

It's bad programming practice, and it can happen on any and every framework.

Collapse
 
smonff profile image
🌌 Sébastien Feugère ☔

I created super tasty spaghettis using React by the way!

Collapse
 
seanmclem profile image
Seanmclem

What are some things jQuery is good for -that you can't already do with vanilla Js?

Thread Thread
 
jessekphillips profile image
Jesse Phillips

What implementation of "vanilla JS"?

I don't actually work with these things, but I did learn that when you're supporting browsers back to IE 6, jquery is very handy.

Thread Thread
 
smonff profile image
🌌 Sébastien Feugère ☔

JQuery is excellent at browser compatibility: you just use it's simple-short-to-write functional syntax and it runs everywhere.

Doesn't it remind nicely the JVM?

Thread Thread
 
seanmclem profile image
Seanmclem

Writing modern js is easy to get full compatability with babel or polyfills

Thread Thread
 
smonff profile image
🌌 Sébastien Feugère ☔ • Edited

Do you call Babel and Polyfills « Vanilla JavaScript » ? It's already JavaScript with super-powers.

There are people who do jQuery and who doesn't know how to set up those kind of environments. And their company don't want them to learn and/or they aren't interested to go further on their own.

I don't say it is good, and it should surely be avoided, but the simplicity of use of jQuery is for sure a great plus. Overusing it at a certain point for complex applications today is surely a mistake and the tools you mentioned should be used in most of the cases.

Thread Thread
 
jessekphillips profile image
Jesse Phillips

Is it though? When do you pull in a polyfill? Is it for every JS feature you use? Did you remember to check the compatibility guide?

Im not saying you want to go without testing, but testing is all about figuring out what is not needed to be tested.

Collapse
 
karataev profile image
Eugene Karataev

Yeah, my current project is on the bleeding edge of technology!
jquery

Collapse
 
edlinkiii profile image
Ed Link III

I'm in the exact same boat, but learning MERN stack for future employment possibilities.

Collapse
 
mkrl profile image
Mikhail Korolev • Edited

Yes! I'm currently the one who's rewriting a 10-year old front-end codebase in favor of vanilla JS. It has come a long way and now is mostly only being used as AJAX wrapper and a Bootstrap 3 dependency.

Every day I'm getting closer to removing this one line from the core module.

Collapse
 
pramanadiputra profile image
Ida Bagus Gede Pramana Adi Putra

Me, I'm still using it as we speaking.

Why? I haven't learned about React or Vue (which I will do in the future). But currently I'm making a web app like reddit.

I want to finish the MVP soon enough, so I will just use what I know at the moment which are Laravel and jQuery.

I don't care if someone will call me old-fashioned developer just because I'm still using jQuery.

And btw, @ben , I've sent you my request through Private Message

Collapse
 
nataliedeweerd profile image
𝐍𝐚𝐭𝐚𝐥𝐢𝐞 𝐝𝐞 𝐖𝐞𝐞𝐫𝐝

There are dozens of us! I promise!

I still actively CHOOSE to use jQuery. Yes it's a dependency, but I find jQuery a lot easier to read and code in than vanilla JS.

Collapse
 
nandoblanco profile image
Nando

same here buddy! things need to get done so I have to use what I know... I'd love to take my latest jQuery project and turn it into React and Vue... and even web components to see what all the hoopla is. just need the time :(

Collapse
 
israelmuca profile image
Israel Muñoz

I did a quick project with jQuery a tad over a year ago!
Haven't touched it again (it's been working fine, no bugs anymore) but I enjoyed it.

Right after that, I started working with Vue and Nuxt exclusively, and I like it way more!
So much cleaner and easier to manage, especially with Vuex.

I tried React as well but I enjoy Vue much more.

Collapse
 
prahladyeri profile image
Prahlad Yeri • Edited

The JS world is buggy, confusing and pathetic with the astronomical number of NPM packages that do more or less the same thing, or the N number of different patterns used to implement the same thing (like object creation or manipulating an array or collection).

And the unfortunate thing is that whenever a popular library or package tries to move towards standardization (jquery, for example), devs seem to be all pitchforks about it! I don't really get all the fury against jquery. Its just a neat library for DOM manipulation, use it if you like, don't otherwise!

Collapse
 
thebouv profile image
Anthony Bouvier

Yeah man, we still use it.

I've said it here before and I'll say it again:

React, Vue, and Angular are fine tools. But if you try to apply it to every damn website you work on, you're over-engineering plain and simple.

Though the loudest devs online are all about SPAs and heavy front end frameworks, there's also a ton more out there building 20 page brochure-ware websites for companies. And at most they want to manipulate the DOM a little bit, do some AJAX calls simply, and maybe some nice form validation.

If they introduced React and it's whole build system into a project like that, they'd blow the budget easily.

Don't write crap code, and jQuery-based websites are not hard to maintain. Too many zealots out there would have you think that choosing jQuery is always horrendous, but they live in a different world. Not all of us are working on SaaS products, SPAs, and re-inventing the next Twitter. We have restaurant websites, ad agency sites, and more to take care of.

Collapse
 
piotrpog profile image
Piotr Pogorzelski

Couldn't agree more.
Why woudl i use some SPA framework if i just need to use javascript for some popup, carousel and AJAX contact form?

Collapse
 
entxcode profile image
Enterprise Productivity Services

According to some official statistics, currently over 70% of all websites use JQuery and it has become an unofficial web standard for DOM manipulation. Other JavaScript Frameworks such as Angular and REACT are popular but unsustainable because they have too many code-breaking iterations.

As an Senior Web Engineer, theres almost NOTHING that I can't do with Web Standards such as HTML/CSS/JQUERY that REACT and VUE and ANGULAR can do.

I speak for other developers who REFUSE to learn the next shiney framwork; stop forcing your web engineering preferences on us. We are perfectly efficienct and content in engineering web experiences for our Fortune 500 clients using simple easy web standards without the need to over complicate it with stacks of plugins and frameworks.

Collapse
 
ma7moudat profile image
Mahmoud Aldaas

Well thankfully not anymore!
I was maintaining a jQuery dependent CMS for my last employer, but kept pushing for a migration to Vue.js throughout last year until it finally worked... I was able to sleep better at night :D

Collapse
 
themarcba profile image
Marc Backes

The flagship product of the company I worked for until a few weeks ago is still rolling jQuery, and it doesn't look like that would change in the next 3 years. It's a too big of a monolith application to just change.

And I would still use it on a daily basis if I wouldn't have quit the job.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.