Makzan / I share what I learned

Is jQuery dead?

When I discuss with web designers on what tech they use these days, people usually talk about Angular, React, Flux, GraphQL, Ember, Meteor… the list goes on. But I didn’t hear people talk about jQuery.

When you learn those frameworks/libraries, you usually search the equivalent way on how to achieve something in that framework without using jQuery. Then there are lots of discussions on “the right practice” of using the frameworks, and how you should not use jQuery when using the framework.

I think this makes some people now think that jQuery is an outdated thing and when you create a web project today, using jQuery feels dumb. You should use those mentioned JS frameworks. It’s 2016 and you still using a library since 2006? Sorry, yes, I use jQuery every day. And I’m proud of not using those JS frameworks in every project.

Is jQuery really outdated and web designers don’t use it? I doubt it. This Quora post provides some well discussions on how people think it is as at today. To me, I use it in every project unless the project requires just vanilla JavaScript. Or until the project is too complex that clearly needs a framework, which is not often actually.

By the way, as mentioned in one of the answer, even Angular uses jQuery if it exists, and if it doesn’t, it uses a subset of it:

If jQuery is available, angular.element is an alias for the jQuery function. If jQuery is not available, angular.element delegates to Angular’s built-in subset of jQuery, called “jQuery lite” or jqLite.

AngularJS Doc

So when we are celebrating the 10th anniversary of jQuery, I want to express that enhancing a web page with jQuery is still a very lightweight and get-the-task-done way. If we can write a small amount of code to achieve an interaction in jQuery, we don’t really need to use an Angular / React / Knockout / Whatever framework. Those frameworks are designed for serious web application. jQuery is a very useful library to enhance most of the websites today.

p.s. Have a clear mind to differentiate framework and library. A library works with other libraries and is replaceable. You can use it with your own combination and freedom. A framework enforces a philosophy on how you should use it. Angular is a framework, Meteor is a framework, jQuery is a library. React, in my opinions, is a library, but it’s whole philosophy—Flux and uni-directional states—is a framework.


Published on 2016-01-16. More articles like this:
- Clip & Quote
- JavaScript
- Web Technologies

Previous <- Styling focus element outline
Next -> Blocking content on mouse hover