Do we still need to learn JQuery in 2020? What are the alternatives? Thanks for the answers;) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6

Do we still need to learn JQuery in 2020? What are the alternatives? Thanks for the answers;)

Jquery

27th May 2020, 1:14 AM
Galileo
18 Answers
+ 6
Galileo Is your project using ASP.NET WebForms or ASP.NET MVC? I should further qualify something about my last set of responses. Along with not using jQuery, I also almost exclusively implement frontend using SPA libraries / frameworks with a RESTful API. In that sense, I also avoid using server side dynamic HTML platforms. Instead, I would use ASP.NET MVC WebAPI or NodeJS on the server side with ReactJS or Angular or maybe even VueJS on the frontend. I'm not opposed to other frameworks, but, there are my preferred choices at the moment. That said, if you are working on any existing projects already using jQuery, then, by all means, keep using jQuery. I would just avoid using jQuery on net new projects moving foward. I hope this information is helpful.
28th May 2020, 7:00 AM
David Carroll
David Carroll - avatar
+ 12
Ore Adeleye Regarding your points below: ---- "So when should you use jQuery. 1. You are making a large-scale app and you want to cut down on development time as much as possible. 2. You are making a web app that needs a lot of modern features that should degrade gracefully in old browsers. 3. Your gut tells you that jQuery is the right tool for the project." ---- My responses to each item: Um... no, and no, and awe hellz to the no. 😂😜 (I hope you read my silliness in this part) 😉 Seriously though... 1. jQuery on large scale apps is a recipe for disaster. I would avoid jQuery on anything new and certainly large scale at all possible costs. 2. I'd recommend using polyfills to support old browsers and if necessary, Babel to transpile down to ES5. 3. If the strongest argument for using jQuery comes from your gut, try taking some Pepto Bismo to treat that upset stomach and stick with the modern JS alternatives. 😉 None of those cases would ever be good for using jQuery. 👌
27th May 2020, 6:43 AM
David Carroll
David Carroll - avatar
+ 8
Tom Joney (TheCoder) That article was like a stroll down memory lane as it described what I lived through. I remember when it was a toss up to decide on using jQuery, MooTools, Dojo, Prototype, and Script.aculo.us. At some point, jQuery became the ubiquitous library used by so many. Galileo My advice is to focus on learning the current Javascript API. If you ever need to support something using jQuery, no worries. By then, you'll be able to quickly learn jQuery as needed by referencing the jQuery documentation. It should all be straight forward for you at that time.
27th May 2020, 3:11 AM
David Carroll
David Carroll - avatar
+ 8
[Why I avoid jQuery: Part 1 of 3] Apologies in advanced for the detailed 3 part response. I hope it's helpful to anyone curious about why I avoid jQuery on new projects moving forward. Ore Adeleye Fortunately, polyfills are now so much easier to implement with core-js modules in webpack. So... there isn't any reinventing the wheel. 😉 For me, the issue with jQuery isn't about the size of the library file. Don't get me wrong... jQuery was a godsend during the dark ages of ES3 and craptastic browser incompatibilities. I've been working with jQuery since late 2007 / early 2008 and have implemented some amazing code with it. However, each year since browsers began to fully support ES6, jQuery has become overshadowed by much more preferred alternatives that have since revealed the many shortcomings of jQuery. I'll try to list a few of the challenges that make jQuery less than ideal for me to use anymore. Simply put, it's not needed like it once was with modern browsers being so compatible. (continued...)
28th May 2020, 6:44 AM
David Carroll
David Carroll - avatar
+ 7
[Why I avoid jQuery: Part 2 of 3] jQuery's greatest strength is how easy it makes traversing and manipulating the DOM from anywhere in the code. It's so easy to bind events to anything from multiple places. This is also it's greatest weakness. As a project grows in size and complexity, so does the jQuery code. It inevitably becomes a nightmare of spaghetti code that's difficult to maintain and keep under control. To be fair, it's not so much jQuery as it is the two way data binding, which was common in most other libraries prior to ReactJS. But, that's for another topic. Over the years, I would experiment with several different conventions and practices in an attempt to keep the code well structured, modularized, and testable. However, jQuery makes it so easy to do what you want, where you want, whenever you want. It's really difficult to keep consistency over time and across different developers with a standardized and centralized approach for binding events and searching DOM nodes. (continued...)
28th May 2020, 6:44 AM
David Carroll
David Carroll - avatar
+ 5
David Carroll as regards your second point. Do you really prefer writing polyfills for old browsers instead of leveraging an already developed library that does that? To me that's like re-inventing the wheel. Let's face it jQuery is not that heavy. It's like 20kb gzipped. I think that is fine in some situations.
27th May 2020, 7:37 AM
Ore
Ore - avatar
+ 5
[Why I avoid jQuery: Part 3 of 3] jQuery more than served its purpose by simplifying the cross browser issues of the past. However, it's time to move foward with libraries that make JS more maintainable, testable, and performant. In my opinion, continuing to use jQuery is simply going backwards, not forwards. I hope this helps clarify why I simply wouldn't recommend or consider jQuery for any new large project. 🤓👌 ---- Side Note: While it might seem unfair, I typically avoid interviewing any candidates who have worked almost exclusively with jQuery. These developers typically struggle differentiating between the jQuery API, native Javascript, and the DOM API. These developers typically don't have much experience with unit tests and will likely have a lot of bad habits that will take a lot of effort to unlearn. I'm certainly not alone with this assessment. So, be aware if you ever find yourself applying for a software development position.
28th May 2020, 6:44 AM
David Carroll
David Carroll - avatar
+ 5
To cut a long story short, please skip jQuery and focus on modern JavaScript including ES6-10, if you want to master front end web in 2020.
28th May 2020, 12:03 PM
Calviղ
Calviղ - avatar
+ 5
David Carroll I totally agree , I am also learning react knowing it is great . once learn vanilla js , jquery automatically comes in handy . I learn it doing small projects
28th May 2020, 4:48 PM
anjit pariyar
anjit pariyar - avatar
+ 4
Yes. Of course. jQuery is worth learning but it won't be ideal for small applications. If all you need in jQuery is easy dom manipulation, try UmbrellaJS. If you are using jQuery just because of Bootstrap. May be you should switch to Pure. If you are using it because of ajax. It is not worth it. Just use the fetch promise-based API. If you are using it because of animation. Please just use css. Visit https://animista.net If you are still confused check this http://vanilla-js.com/ jQuery is a great library but unfortunately most of the features it was awed for can now be easily done with pure js. So when should you use jQuery. 1. You are making a large-scale app and you want to cut down on development time as much as possible. 2. You are making a web app that needs a lot of modern features that should degrade gracefully in old browsers. 3. Your gut tells you that jQuery is the right tool for the project.
27th May 2020, 6:29 AM
Ore
Ore - avatar
+ 4
anjit pariyar Do yourself a favor and force yourself to breakfree of the jQuery plugins. Find alternative variants of the same plugins. Otherwise, you'll be stuck supporting plugins that have become long abandoned by their project owners. Trust me... it's no fun. Also, trying to support ReactJS + jQuery is also difficult with attempting to write unit tests. Just skip it. That's my advise. 😉
28th May 2020, 4:11 PM
David Carroll
David Carroll - avatar
+ 3
David Carroll That's very insightful! I gained a lot. About the interview part, don't worry, there are a lot of legacy code in jquery that need help. jQuery developers can't be out of job so soon. Also, another situation where I think jQuery comes in handy is when a backend developer wants his site to look great without much frontend knowledge. But for most other situations, there are better options.
28th May 2020, 7:47 AM
Ore
Ore - avatar
+ 3
anjit pariyar I'm so glad you put it like that. Thanks for sharing your experience. 👌 I guess I should further qualify that if you are able to learn these things with ease, then by all means learn jQuery as yet another skill to have under your belt. However, don't allow yourself to make it the core skill for development.
28th May 2020, 7:24 PM
David Carroll
David Carroll - avatar
+ 2
Thanks all for your helpful answers! David Carroll, Ore Adeleye I actually have been learning pure JS, but my friend who works with me in a project, uses a lot of JQuery. The project is quite big and we develop with ASP .NET, C#, JS, HTML5, CSS.
27th May 2020, 8:27 AM
Galileo
+ 2
David Carroll thanks for the answers! I learnt a lot from them. They were like a tutorial:) The project is using WebForms
31st May 2020, 9:49 AM
Galileo
+ 1
Galileo I am eager to see David Carroll response to that.
27th May 2020, 8:36 AM
Ore
Ore - avatar
+ 1
Even upcoming bootstrap 5 is going to remove it . but there are so much plugins out there of Jquery so its okey to learn, it won't take long
28th May 2020, 3:48 PM
anjit pariyar
anjit pariyar - avatar
- 2
jQuery is probably the most effective librarie for js
28th May 2020, 2:16 AM
Mason Arb
Mason Arb - avatar