Note Canvas is a web application where you can store all your notes! Click the button below to sign up; registration is instant!
Sign Up For Free Here!
Posted 4 months ago
Go Back

Why jQuery should be more appreciated

Uploaded Image

jQuery was once the world's most used Javascript library, and its influence is undeniable--even in ways you might not expect. In fact, as recently as 2019, an estimated 74 percent of all websites still use jQuery, even in the JS framework era. This is code that websites are run on, and webpages that can be viewed in anything from your beat up Macbook to sometimes even your smart TV. 

However, everything must come to an end. The first is the rise of standardization of implementation of Javascript across browsers, lessening the dependency on jQuery. Browsers updated much more quickly, and browser-native code became much more feasible across browsers, thus eliminating the main reason people used jQuery. The second reason can be attributed to the rise of JS Frameworks like React, Angular, or Vue, which made single-page applications much more viable, and started the trend of MVC's for the front-end. This is kind of hard to admit considering this site in particular uses jQuery extensively (for reasons I will divulge in a later article), but in many ways, it's obsolete for modern front-end development. Bootstrap dropped its usage for jQuery in Bootstrap 5, which was released a few days ago (from when this was posted). A quick search on "is jquery still used today" has most people saying that while they use it to maintain enterprise applications or make simple webpages quickly, they would no longer use it as a foundation.

With all that said, what is jQuery's legacy? Responses to that one are mixed. While some still actively use it to this day, there is a very common sentiment amongst JS developers that hate it. Another google search on why is jquery hated yields 400,000 results. Most common reasons boil down to:

  • it becoming a meme on Stackoverflow
  • encourages "spaghetti code" from JS devs who aren't very learned on JS fundamentals

While these are valid concerns, I don't think that warrants the kind of disdain that they have for jQuery. Think about everything that jQuery has done for javascript development:

  • In the late 2000's, jQuery made programming in javascipt easy.

    While it is something people take for granted now, cross-browser compliance in JS is something people would be much more grateful for if they had to comply with Internet Explorer 6.

  • Its syntax was intuitively understandable and easy, and it made the creation of small webpages much faster.

    Granted, this might also have been a curse considering the aforementioned spaghetti code, but that is true with every framework that was not used for its intended purpose. It's just that jQuery was so used, that the examples of spaghetti code were much more common (by perception) in proportion to its actual rate of occurrence across the JS code world. That is not really an indictment of jQuery, but rather a positive light on its legacy as a JS framework. We don't hate on roads because potholes exist.

  • It made the learning curve for Javascript easier.

    In addition, what the proponents of the "spaghetti code" argument don't realize that jQuery allowed these "spaghetti code makers" to learn javascript while using javascript. As Alex MacArthur pointed out in his article:

    "For these people, jQuery allowed people to deliver the value being asked of them, while serving as a catalyst to immerse them into the field of web development and thereby catapulting them into continued learning."

    Jeffrey Way, founder of Laracasts, said of jQuery as well in a podcast: (10:44) 

    "One thing the purists (and I don't mean this in a derogatory way) didn't appreciate is that jQuery provided a 'welcome mat' to people who had been scared away by the language and the inconsistencies and the browser quirks. Literally thousands and thousands of people walked through that door..."

I hope that I have convinced you to look at jQuery in a more positive light, if you were previously not looking at it that way.

Keep in mind that, when I say this, I am not suggesting that you should still use jQuery for new web applications. What I am saying is that we should reevaluate our opinion on jQuery as a web development culture, and give it the reverence that it deserves.


Notice: you can comment as a guest. Just click "Name", then check the "I'd rather post as a guest" option.

Note Canvas is a web application where you can store all your notes! Click the button below to sign up; registration is instant!
Sign Up For Free Here!