DEV Community

yahya jamaldine
yahya jamaldine

Posted on

Should You Learn jQuery in 2021?

I feel you sure,this is a pic  of a hand and the Jquery logo on it

Photo by Robert Schultz on: Flickr

An old thing becomes new if you detach it from what usually surrounds it. "Robert Bresson",
In our case becomes useful

(before we start consider bringing a cup of coffee or tea)

jQuery

jQuery was considered or I guess still considered the greatest JavaScript library. and for the main the time it is the most popular one , with its famous slogan "Write Less, Do More", it was like the superhero of JavaScript libraries among Backbone.js and Underscore.js brought by our Friend in the domain John Resig since 2006 ,and that's even before I have used my first computer(I've used the first one in 2009),and he wrote jQuery for some
particular reasons like:

Simplifying JavaScript tasks

Tackle some web development problems

You can install jQuery just by including its source code or its file location in the head or the body of your Html page just as you include a regular JavaScript code or CSS code, without giving a damn if the code you wrote will get executed after the page is fully loaded, provided you include it (jQuery source code) first before you write any JavaScript or jQuery code like this:

This library was there it was really there in its time exactly between 2010 and 2015, you want to be a good web developer in that time you go learn some Html, CSS, JavaScript, and jQuery and you just add some Php&Mysql to the equation if you want really to control your website entirely, and by the way I didn't say if you to be a front-end web developer.

Because back to that time practically there was no term such a front-end or back-end so you just do learn four or five things and boom! you're a web developer but these days just to be a great front-end web developer it will take time and effort to delve into essential things plus other technologies and skills that are required for you as a Mid or Senior front-end developer.

By the way , we are not here to talk about this, but if you're really interested in getting some recommendations as a beginner in front-end web development, you can check this:
Vocal

So back to jQuery First time I've met jQuery was in the fourth edition of jQuery book by Jonathan Chaffer and Karl Swedberg, the first edition of the book has been published in July 2007, the second one published in February 2009, the third one in September 2011, and the one I've read the fourth edition was launched in 2013, plus I've heard there's a fifth edition published in 2017.

I often hear on Quora, Reddit or Twitter, and some groups on Facebook that jQuery is dead plus some questions like should I learn jQuery, I still don't get it, for me it was the best way to reveal my power in writing a JavaScript code, but the fact that there's New future in modern JavaScript (Ecmascript 2015, ES6 and beyond..) out there to make your code "beautiful, small, wired and efficient plus solving a lot of common problems in the web development", makes people ignore even thinking about learning jQuery. although all these features have been covered by jQuery itself years ago .

There's a lot of people who just learned enough stuff in front-end web development with JavaScript HTML & CSS, enough to create a simple web application or web page and now they think about extending their journey to build at least an interesting web application or even an entire website so they choose whether to learn Angular or React or maybe Vue.

jQuery didn't get much popularity in the last 4 years this why I didn't mention it with the three, because its peers in the front-end "React, Angular, Vue" really emphasized their strength and usefulness in the field, so as a new front-end developer there's a high percentage that you may choose other technologies over jQuery.

I liked JavaScript the first time I wrote my first line in VsCode, but jQuery pushed me to continue in the path of learning and improving my skills in JavaScript, and some of its capabilities are:

Capabilities

Mutating and Accessing the elements and contents of your document with Just a few lines in other words traversing and manipulating the DOM(document object module).

Responding to the user's interaction and styling your web page in a beautiful way, plus my favorite jQuery technic by far: Sending data with (Ajax) =>(Asynchronous JavaScript and XML).*

Let's write a simple program:

Yeah the regular "Hello world program", but you know there's multiple ways to write the hello world program in JavaScript wither to print it to the console or manipulating the DOM(document object model) by selecting a DOM element and rendering its Text, or we can use the Alert() method, so let's do that with three ways on jQuery:


So how does it seem or feel, very weird, terrifying? yeah I know I was afraid the first time I've seen the dollar sign($), with the word document inside parentheses but all the other were just a normal ready() method plus a callback function inside it ,(well in fact this feeling of being uncomfortable always encounter me when I'm about to learn a new library or technology it's normal ).

So inside the Callback function, there's: a jQuery object in the 9th line referencing to div element two methods: appendTo() "appending the div element to the body of the HTML page as usual in JavaScript", plus the DOMElement.text("String") that act like DOMElement.innerText=" String" both of them in the same line and that's what we call Chaining, by the way, if all these words("Append, Chaining, Callback, DOM, higher order function, Closure ") sound weird please consider doing a refresh, or even trying to take a JavaScript tutorial again, this what I did when I fall in the same problem.

However I'm not here to teach you jQuery or to force you to do the things that I did, I'm here to give you my opinion about learning jQuery in the meantime .the action after that is the steps you're going to take Today.

Resources

Install jQuery .

Learning-jQuery.

Finally

To get that kind of taste about how JavaScript can do whatever you want with your web page and just with few lines, plus helping you to conquer those worries about the JavaScript world, I highly recommend to learn jQuery, So just give it some afternoons with a cup of tea in case you want to strengthen your power in JavaScript as a beginner.

As I've mention, the new release of EcmaScript covered almost things that jQuery been good at years ago so you don't really need to learn jQuery just in case you want to tackle a problem just google it.

There are some libraries out there that could replace jQuery, privileged with small size and good performance so you can check out Cash, or Zepto if you want.

In case you're already doing well with vanilla JavaScript or already started developing with Vue, React or Angular I just don't recommend turning the wheel back and learning jQuery, just go ahead and please stay Up to date.

You can read the same article here on : Vocal

This post was originally posted on Medium by me :
"JavaScript In Plain English"

Top comments (2)

Collapse
 
epsi profile image
E.R. Nurwijayadi

I have compared cash.js to replace jquery. There are limitations, but both works well. You can find the comparison case in my article here.

epsi-rns.gitlab.io/frontend/2020/1...

Tabs Component with jQuery and Cash

Collapse
 
codefinity profile image
Manav Misra

Learn fundamentals of JS. No need to ‘learn’ a framework first.
With fundamentals of JS down, ☝️ can pick up jQuery 👎, Angular, React, etc. and have it actually make sense and not be ‘magic.’