Do we still need jQuery to DOM-script web pages?
It?s not about the advent of Angular, React or Vue, it?s more a fact. Developers know that frontend programming has been evolved into something serious, very serious, and that?s why we need a modern JS framework like those I told before to better implement OOP, design patterns, performance improvements, code management and reusability, but it?s even deeper than that. I will explain, using key case studies, why jQuery is becoming useless day after day and will become nonsense in few months.
Photo by Jan Tinneberg on Unsplash
No way: jQuery is so popular
No way: jQuery is animated, too cool for me!
I remember when jQuery was released, I had a friend of mine looking at its animations and he almost froze? and so did I. jQuery common methods like show(), hide(), slideUp(), slideDown() ruled or years in UX, even Google used jQuery for its first versions and of AdSense. Today we got way better stuff. First of all, Google switched to GreenSock due to jQuery performances behaviors and inefficiency. If you inspect the code behind the top coolest websites around using animations, no one of those use jQuery. Even more, you can get simple and effective animations using plain CSS transitions. That?s why this implementation is after all a sort of a fork crossroad: use CSS transitions if you need basic animations, or use a dedicated framework if you want really fast and smooth animations. jQuery is not that cool in that actually, it just was a precursor.
No way: jQuery selectors are fundamental
No way: jQuery simplifies AJAX
Another factor of goodness about jQuery popularity was the ability to produce XHR requests with a simplified syntax. Moreover, the $.ajax method is even more simplified with $.post and $.get methods. jQuery not only did simplify the way to code XHR requests, it also made them work on all browsers in the IE 7 and beyond era. Today, anyway, you can use a new XMLHttpRequest() to make HTTP requests work on IE 10+.
No way: jQuery is integrated in Bootstrap and other UI frameworks
Conclusions: way. jQuery is almost useless?
But one things is for sure. In less than 1 year jQuery will be totally useless for new projects even if it will supported for some more. After all, with the advent of Angular, Vue and React, jQuery is just becoming a long date friend, one of those you can?t wait to leave and abandon forever.