Jump to content
Search Community

E.C. Discussion: To jQuery or Not To jQuery

iDad5 test
Moderator Tag

Recommended Posts

I'll start right into it with my Question, more about why and how I'll add (for those interested in) afterwards.*

Do you (still) use jQuery or have you (already) switched to vanilla Javascript?
 

I guess we all agree that it's a good thing not to carry around unnecessary ballast in our projects, and I'm aware that jQuery is less necessary than it used to be.
I still use it, probably mostly out of habit and I find it more comfortable some times. Also there are still a lot of smaller issues of browser incompatibility that jQuery solves in the background...
But I also tend to write more and more code in plain JS that I used to use jQuery for. What is your opinion / experience  and if you haven't already are you planning to dich jQuery sometime soon?


*E. C. Discussion  stands for extra-curricular discussions as approved by Jack. I am hopeful that this community here is of the dying breed of creators that love technology and (motion-)design. And as you choose to go with greensock I feel confident that you choose your tools with consideration.
I've been doing 'internet-stuff' - design, programming, content... -  it since the mid 1990ies and had to adopt new technologies  and frameworks thousands of times. Making the right choices often isn't as easy as going with greensock from early on, so input from others is very welcome. Openly discussing and sharing approaches on a broader scale than just problem solving is something I would enjoy. 
There are a lot of good things I learned from various online discussions over the years, being it new tools new techniques or great concepts.

Link to comment
Share on other sites

Hey,

 

Personally, I don't use jQuerry.

I see no reason for it, mostly if not entirely made of syntactic sugar.

 

Using Vue, Nuxt, Tailwind, plain ol' JS  (also express, node, mongodb/firebase/sqlite.)

 

Depending on what you need I guess. If I go without vue, I tend to gravitate towards highway.js and barba.js for transitions.

 

 

 

  • Like 1
Link to comment
Share on other sites

20 hours ago, tailbreezy said:

Hey,

 

Personally, I don't use jQuerry.

I see no reason for it, mostly if not entirely made of syntactic sugar.

 

Using Vue, Nuxt, Tailwind, plain ol' JS  (also express, node, mongodb/firebase/sqlite.)

 

Depending on what you need I guess. If I go without vue, I tend to gravitate towards highway.js and barba.js for transitions.

 

 

 

Ok, your answer got me thinking, how does he know all that stuff (not sure about all those and what to call them correctly) well enough to use them efficiently. Also with some of them it always seemed hard to stay up to date with changes...

As I'm not really familiar with mots of the tools (?) you mentioned it would be interesting (a few examples) when you use which and why?

Link to comment
Share on other sites

  • iDad5 changed the title to E.C. Discussion: To jQuery or Not To jQuery

As my projects mostly involve Wordpress or might end up in there at some time jQuery is a give for me and therefore I often use it. But I do no serious programming whit it, actually never have. I mostly use it for comfort and compatibility.
I only used the simple animations in the early days but switched to CSS-transitions (very rarely animations) for the non essential and simple stuff for everyting else I preferred gsap for ever.
Comfort meaning mostly adding and removing classes on multiple elements (one line vs. looping in vanilla js) and AJAX. (I try to avoid AJAX, as I feel it gives you a potentially inconsistent and unreliable user experience, but that might be for an other discussion...)
I used to use it to find nodes based on their complex relationship but I try even harder today to avoid the necessity to do so by better structuring the DOM.
I also try to avoid setting inline-styles with jQuery (or plain js) more and more for several obvious  reasons, but I used to do so with jQuery and if I absolutely have to i still do it with jQuery. But for performance reasons and to avoid collisions with gsap I switched to changing / adding declarations to stylesheets.
That brings me to compatibility directly manipulating loaded stylesheets breaks with older browsers which I can (and want to) risk in more and more projects but there are some where there this isn't so easy. I regard jQuery as a compatibility-fix for a lot of unknown issues that might occur seldom.


Switching to plain js on would mean for me to write some comfort function of my own (to outsource loops for example or handle differences in http-requests) so essentially rebuilding parts of the functionality that tried and tested jQuery offers probably better. That's one reason I'm reluctant.
One reason why I like to go for going without it is TypeScript. I find it helpful and often education to strictly type my code and not having every second object being a JQuery instance.

What's your experience, which (other) pitfalls should I avoid or be aware of if I ditch jQuery in the near future?

Link to comment
Share on other sites

3 hours ago, iDad5 said:

how does he know all that stuff (not sure about all those and what to call them correctly) well enough to use them efficiently.

 

Not sure what you mean. 

 

 

This is a pretty basic full-stack, I don't pretend to know any of these at a proficient level and I really don't need to. I don't work for clients, they just suit my needs. The goal is and was to be able to built products for myself with minimal help from hired devs.

 

Any of the aforementioned are essential in that regard to either speed up the process and/or for providing better performance/optimizations.

The db solutions are also pretty standard, but you do need dbs, so there is that. :) 

 

All of these are either js frameworks or compatible with js, so there isn't much context switching in any case.

 

Of course you can also go ham and built everything vanilla if you don't want much hand-holding and enjoy reinventing the wheel.

 

 

 

Link to comment
Share on other sites

@tailbreezy

 

Ok I guess I understand a little better how you think and work. I totally have a different approach - much more old school I guess.
Most of what you mentioned seems just a lot of overhead, and I have seen too many of those frameworks being hyped and than fade away to really bother with them. But depending on the things you want to achieve (longevity probably not one of them) it might work well.
I have to confess that using those frameworks efficiently I would have to make too much compromise design wise and in terms of usability, accessibility etc. 
But that was my past experience with several others and I'm still interested in finding new and better ways to do things.
It took my quite a while to decide for a CSS preprocessor (waiting for the battle of SASS vs. Less was just one reason) but I'm now a believer.
Same with TypeScript.
Tailwind I do not see a reason to use, and for vue.js - it sounds interesting, I just wouldn't know how it could help me.  
 

Link to comment
Share on other sites

Thanks for the links it might help some who want to get rid of jQuery. As already stated, I'm not much in a hurry, as with wordpress it's just there and in some cases it just seems the better alternative to me than using other libraries that are probably more en vouge but aren't as time tested and which update to new incompatible versions every second day.


I found some compelling arguments here https://www.arp242.net/jquery.html that support my thinking up to today.


I remember reading an article about a year or a year ago about a lot of not very well well known browser bugs / incompatibilities that jQuery silently fixes in the background. It as a very long and impressive list. And most of those weren't old IE's bus newer Versions of FF, chrome and Safari.
Therefor on reason for me not to ditch jQuery sooner was the idea, that it might me help avoid problems that I never would have found as it's just not possible for me to test all those versions of all those browsers on all those machines with all those OSes.

How do you test those, or are some of you just happy it it is standards conform and works in you environment - everything else is the users problem?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...