It's ok jQuery, I still love you

It's ok jQuery, I still love you

Written by Tony Lea on Jan 3rd, 2021 Views Report Post

This is more of a story than a tutorial. It's a story of a library that reached great fame and then became hated by developers everywhere. If you can't tell by the tone, this is also a semi-sarcastic light-hearted post.

Let me take you back in time. The year was 2007, and the web was a scary place. There seemed to be no structure, and people used to FTP files to production without source control. Web development was still fairly new, a little scary, and very exciting.

Why did people use jQuery

Back in the earlier 2000s, it was almost a requirement that your website was compatible with early versions of Internet Explorer. The mobile web was also emerging, and javascript needed to work on mobile devices. This was one of the main reasons developers adopted jQuery. Include this library, and your website would be cross-compatible with browsers and mobile devices. Hazah! 🤩

Another reason developers used jQuery is that it was easy to add interactivity to your pages. Need a click event to trigger a simple animation of an element. JQuery had you covered:

$('#button').click(function(){
   $('#box').slideToggle(); 
});

It was also very simple to create jQuery plugins that could be used by fellow developers. In fact, back in the day, I created a jQuery plugin called Illuminate. It would add a simple illuminate animation to any element. Check out this video 😂 (Don’t judge the video, it was pretty bad, and as I said, these were ancient times).

So, all-in-all, jQuery made our lives easier as developers, and it allowed us to create compatible javascript interactions.

Is jQuery still used

We can't really be certain if developers reach for this library when starting a new project; However, according to Wikipedia, 73% of websites still utilize some jQuery. That's insane! But it makes sense.

WordPress, the most popular CMS to date, has many themes that were developed with jQuery. It's almost certain that you will probably find some jQuery if you are working on a legacy project from 5-10 years ago.

The first release of jQuery was back in 2006, and for the following 5-8 years, it was hailed by developers. It was a celebrity amongst javascript libraries, but this fame and popularity would soon end.

Why do developers hate jQuery

Nowadays, many developers choose to stay away from jQuery because there are so many great alternatives available.

Recently, people and technologies have stopped supporting legacy versions of browsers. This opens up some really cool things coming to the web, including webGL, animations, and interactivity. If we no longer need to support legacy browsers, then one of jQuery's main functions is obsolete.

jQuery has also become hated for its large file-size, weighing in at over 200k (non-minified). A large javascript file could negatively affect your SEO and user experience.

Many developers, including myself, used to throw this library in a project to add a few click events and DOM traversal functionality when in reality, it could have been done with some very simple javascript code.

As with most celebrities, fame and age decline in popularity at a similar pace, the older it got, the less popular it became.

Should you learn jQuery

Unless you are working on a legacy project that utilizes jQuery, I would probably suggest that most people do not need to learn jQuery.

If you have a general interest in how jQuery works, you could definitely learn it; however, most new projects nowadays will not utilize this once popular library.

Short Answer. No, unless you need to.

Conclusion

I used to grab every javascript or PHP library I could get my hands on and incorporate it into my projects. Back in the early 2000s, the web wasn't as big as it is now, making it possible to learn most libraries; however, nowadays, it is nearly impossible with a new JS framework popping up every day.

I have a love for jQuery that runs deep into my nostalgic neuro-pathways (if that evens makes sense). Every web technology and library of the past is a stepping stone to where we are today. I became a better developer through the use of jQuery; therefore, I can never hate something that has helped me grow.

So, jQuery, although I still love you, I no longer need you. But... You will always hold a special place in my heart ❤️.

Comments (0)