"It's embarrassing to use jQuery" - Do you agree?

I was working on a simple landing page for one of our projects and suddenly my boss, who happens to be a CTO, tells me not to use jQuery. He thinks it will be embarrassing when other developers discover we still use jQuery in 2019.

In my opinion, it's completely OK to use jQuery in simple websites rather than converting each project to React or Vue powered. Do you agree with this?

Learn Something New Everyday,
Connect With The Best Developers!

Sign Up Now!

& 500k+ others use Hashnode actively.

Gijo Varghese's photo

From the perspective of a CTO, here is what I'll think

  • It's a landing page, everyone will see it. If someone looking for a job and find that this company is not using modern technologies, some may not consider it
  • We're teaching new dev React, not JQuery. So if there are any edits, even juniors can do it
  • Performance wise both React and JQuery are really good. But by default React comes with great tooling (CRA). Like Eslint, Sass support, enforce component splitting, etc
  • Use familiar plugins/libs if need in future. Suppose your CTO, as well as others, who are already familiar with React libraries (than JQuery) it will be much easy to integrate
  • Longer vision - For now it may seem like a simple landing page. But if future it may evolve into something large

There are many more if you think from the perspective of a CTO. Please don't blame him.

Richard Uie's photo

I might be embarrassed to use jQuery for a *simple landing page." Not because jQuery is dated, or I give a hoot about others' opinions, but 'cuz it's big...is the weight of jQuery justified? VanillaJS remains a viable option.

If the use of jQuery is reasonable, is it adequate? If it is reasonable AND adequate, is the landing page the front door to a site/app/platform that will use other, more heavy-weight libraries? Once you and your visitors pay the download cost for your choice of library the first time, it likely won't need to be paid again; if jQuery won't be used for the remainder of the app, then I would probably standardize the landing page to use the heavier-weight kit that will be common throughout the later parts.

Does your shop own a population of developers similarly well familiar with jQuery and your other library(ies) of choice, e.g., those favored by your CTO?

There's a network of interrelated issues to drive the decision as to which, if any, framework(s) to employ. I'm mostly concerned with performance, user experience, supportability, and cost-over-lifetime. I see the balancing of concerns such as bandwidth, shop standards, and developer skills as the measure by which to assess jQuery's appropriateness for use. The opinions of "other developers" as relates to the age of jQuery (or any tool extensively represented in my code-base) strike me as irrelevant.

Hammers come in different shapes and sizes for a reason. A hammer's age should rarely be the basis for choosing it.

Marco Alka's photo

jQuery is a tool, and as long as you have a proper use-case (like supporting old browsers), it is ok to use imho!

Just make sure that you know about the current vanilla JS API, because many things jQuery was useful for were standardized and are now available directly in browsers (like querySelector() and the Fetch API).

Pankaj Patel's photo

No; I do not agree.

In my opinion, it's completely fine to use jQuery; not embarrassing at all.

It is the same as saying "why are you driving Toyota Prius (as an example) when there is Tesla (for an example) or maybe Ferrari"

Every project has needs and it is useless to overengineer projects just for the sake of doing it.

If I don't need to use React; I won't; I might get the things to get done with jQuery.

If I don't need to use jQuery; I won't; I might get it done with vanilla JS 馃槑.

P.S. In fact, I write about the tutorials without Framework in mind but the problem in Mind. Check them out at time2hack.com

Mike Schinkel's photo

Ask them if it is important enough to allocate 2-3x time to the project. If they say yes, then use it as an opportunity to get better with React or Vue.

Edgar's photo

Software Engineer

You don't need to learn React or Vue to create a static website, you could do it of course, but it isn't that you have always to use them.

Mike Schinkel's photo

WordPress Engineer

"You don't need to learn React or Vue to create a static website"

And,... that was clearly not what I wrote. Point? Missed.

Ben Buchanan (200ok)'s photo

I think the wrong jump has been made. For a simple website, you don't need jQuery and you don't need React. Vanilla ES6 is absolutely fine for the majority of DOM scripting requirements in 2019.

I certainly wouldn't recommend React for 'a simple landing page', that's overkill. But I think it's also worth asking yourself if you really need jQuery. If you think it's the right tool, then cool. Get your job done!

As for whether it's embarrassing, that's a bit misguided over a landing page. If you were starting a major new application or product build in 2019 based on jQuery, then I'd have serious questions - for that I would recommend React. But that's not what you're describing.

Edgar's photo

GitHub removed jQuery and they wrote about it here githubengineering.com/removing-jquery-from-..

My personal thought is that it is not embarrassing but kind of unnecessary nowadays

Tiago Celestino's photo

I am a brazilian front-end engineer

Why do you think to use jQuery is unnecessary nowadays?

Edgar's photo

Software Engineer

jQuery is a set of utility functions, you first need to recognize the functions you really need from jQuery. So if you need:

  • ... .ajax()? there is the native .fetch
  • ... query elements in DOM with $('selector')? you can use document.querySelector or document.querySelectorAll
  • ... event listeners? you could use the native addEventListener or a more lightweight library such as github.com/dgraham/delegated-events ....

PD: I'm not saying jQuery is a bad thing, it is just that browsers and/or standards have evolved

Sarah Mattar's photo

What about hosting considerations? A website styled with jQuery can be hosted as a static website - anything done with React is going to require a Virtual Private Server to spin up a Node-based web server/web application.

If we are already looking at Enterprise level deployments, the cost of a VPS hosting package is likely not a consideration but for a small business, it may still be. (For example, I love my web applications, but deploying them is a different matter. I have to head over to Heroku to do so, instead of using the $10/month hosting package I have through GoDaddy which is currently sitting idle.) jQuery may be an option to create a relatively interactive website and keep costs down for clients who are not in the market for a web application with VPS hosting.

Edgar's photo

Software Engineer

That's not true, React apps can also be deployed as static websites (after compiled/built), If your app connects to an external API that's another matter.

Sarah Mattar's photo

That's fair, I was not thinking of it in a post compiled sense, but I suppose it could be compiled and added in with a static site. I'm so used to working with React as part of a tech stack that I didn't think of it that way.

Joseph S Stevens's photo

I think your boss has a point, and heck, if he is cool with you spending the time to do something nicer, all the better right?

Logan Hart's photo

The CTO has strategic decisions to make about what technologies the organization is going to support. If you're making a landing page for you, no problem, use jQuery and whatever else you like.

The CTO might be thinking about maintaining the page, or using the landing page project as a reference for future employees, in addition to having it as the first thing everyone sees.

If your boss is making a request, and it isn't unreasonable, just let him know how much longer it will take to use vanilla or the framework of choice so that he knows there's a time investment.

Vijay Thirugnanam's photo

We used jQuery for our landing page recently. Keep the landing page as a separate project which uses jQuery. And the authenticated part of the project as a separate project which uses one of React, Angular or Vue. Hope it makes sense!

David Carr's photo

It's totally fine to use jQuery it's a tool. I use jQuery still as its needed for Bootstrap and I tend to use that for all front end needs.

There are other things sure but it will take time to implement and test and you could just use jQuery and complete your task.

Rafael Morais's photo

I agree with you, it should not be embarrassing at all. But I feel like there should be a better alternative. I try to use zepto instead of jquery as much as I can.

SeanKPS's photo

Things done with jQuery can easily be done with regular Javascript, and don't need a framework to replace it. I believe a crutch is a good analogy for jQuery.

Chris Brickhouse's photo

I prefer to use whatever tool that makes the most sense for the job. For something simple like a landing page, jQuery or vanilla JS would do the trick. If you're working on something that would require multiple screens and data entry, a framework like React or Angular would make more sense. I don't see a need to be add complication to something unless it's warranted. Also a lot of people have legacy jQuery apps that would require too much time to convert to a new platform so they're stuck working with it. I fall into this category and I'm sure a lot of other people do as well

Billy Wilcosky's photo

In five years, people might say the same thing about Vue. It's all silly. If the website is fast, looks nice, and is coded well, it doesn't matter how you do it. People get way too passionate about hating jQuery.

I'm going to laugh when jQuery makes some kind of resurgence and it's "cool" again. Maybe because of a new release or some other reason that comes up in the future.

Pawe艂's photo

What is embarrassing is to use a tool not because you find it a good fit to solve the problem, but because you find it "cool", "modern" or whatever other non-technical reason. It is totally fine not to jump on React/Vue/Angular bandwagon while you are coding simple landing page. If jQuery is a perfect fit (because of plugins, for example) just use it.

Mihai Deta's photo

No its not embarrassing, it is faster than writing 8 lines of vanila and you get the job done.

Bridget Sarah's photo

Jquery isn't in embarrassing but I think your CTO might be thinking more of the future to be honest. Jquery is stable in the market but alot of companies are now heading towards the latest tech being React over Vue. Thing is Jquery depending where it goes on the market could save the business money over time, but at some point it will need to be rewritten if Jquery stops like PHP. One of those things I think you and your CTO might have to have a discussion, whats worth it in the long run?

Zoli Szab贸's photo

Wait, what? Did PHP "stop"?

dhanushka madushan's photo

Totally disagree. It is really easy to access DOM element by using queries in JQuery. If we do same thing in plane javascript, then that would be a totally messed up most of the times.

Edgar's photo

Software Engineer

take a look at native APIs that browsers provide developer.mozilla.org/es/docs/Web/API/Docum..

Here you can see almost all current broswers support it caniuse.com/#search=querySelector

Siddharth Vishvanath (Sid)'s photo

No I am not embarrassed to use jQuery. Yeah I agree that latest frameworks have taken over jQuery. Even today I would love to use jQuery not for big projects but like making small animations or something.I personally recommend for people who are learning Front End Developer to learn jQuery because they can do something great to showcase recruiters. Learning the latest languages or frameworks is important but knowing the evolution of the language to what it is today is much more amazing to think about.

Maybe in the far future we could see jQuery evolve to be used in AR and VR. Who knows.

Afromaster Herv茅's photo

For simple project... I use Vue.js... for large Angular.... I feel so deprecated when I'm using $() on 2019.

James Houck's photo

Depends on the image of the business, I suppose. As a developer, I would not judge anyone/business for using a particular toolset. It's much more about how it's used and the reasoning. My gut says this is about insecurity- if the CTO takes the stance of 'new', 'fresh', is good, old is bad, then he may project to some that he is on top of his game or 'in the know'. Appearances are very important for leaders, and some are more genuine than others. If you really want to be innovative, create your own library using vanilla js. I wouldn't stress, dude.

Owen Hardy's photo

Have you considered something like Cash (a much smaller alternative to jQuery)?

Aniketh Saha's photo

I don't think so. It's the same like "it's embarrassing to use GUI over CLI. Personal choice matters the most and if it is helping in development then use it thats it.

Serdar Sanri's photo

I don't believe it is embarrassing using jquery in any project. Then we should say it is embarrassing to build something vanilla javascript since it is older than js

I know it is a very bad practise to use jquery in a react project but sometimes it is either you have to or convenience. You just need to make sure it is not causing ang memory leaks and is it really necessary.

To me, even for junior developers, not knowing anything about it is much more embarrassing.

Tiago Celestino's photo

If you CTO's looking for another websites in another companies, he will be scared.

Peter Fox's photo

In 2019, yeah, for the most part. Sure you can make some stuff work and jQuery is more readable than vanilla JS but honestly the biggest problem to me is you should be using something like webpack or gulp to build your js. Most using jQuery are locking themselves into having dependencies of lots of plugins that are poorly maintained or hard to customised.

irreprehensible's photo

Every JavaScript coder should love jQuery. The landing in the (CTOs humble opinion) might be a show and when potential viewers press F12 just to have a look, they wouldn't appreciate the hardened JS guy who wrote it but might think (with all naivity) this looks really obsolete. It's like you need to know the classes before you know the objects. But thats how the objective world works.

Want to read more?

Browse featured discussions

漏 2020 路聽Hashnode