It's time to ditch Medium for good! 🌈⚡️

Introducing Devblog by Hashnode. Blog on your domain for FREE. Highly customizable and optimized for developers.

Learn more

"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?

Write your answer…

30 answers

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.

Reply to this…

Share your programming knowledge and learn from the best developers on Hashnode

Get started

GitHub removed jQuery and they wrote about it here

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

Show all replies

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 ....

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

Reply to this…

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.

Show all replies

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.

Reply to this…

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?

Reply to this…

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.

Reply to this…

Load more responses