Re:Gov.uk drops jQuery from their front end
by Beltalowda on Thursday May 19, 2022 @03:21PM
(#31438907)
I think it's not so bad if you organize things reasonably well and minimize "lemme just modify the DOM a wee bit here" hacks. jQuery was popular at a time when "cowboy programming" was very common, leading to a lot of really bad/difficult jQuery apps; but that wasn't strictly jQuery's fault, as such.
That said, front-end frameworks can of course be a better choice for many things, even if it's just because it provides this kind of organisation by default making it easier for the, ehm, less organized devs.
Re:Gov.uk drops jQuery from their front end
by dspillett on Thursday May 19, 2022 @12:06PM
(#31436455)
Though for that little work, I'd rather have a small local library that implements what I need over standard DOM & JS parts instead of the full weight of jQuery.
Unless of course I need to support legacy browsers, then jQ is a no-brainer - that crap is solved there and I don't want to have to deal with it myself.
And while jQ is large compared to my little home-grown set of wrappers, it is small compared to all the other stuff many pages draw in these days, so perhaps size isn't a great metric to criticise it on!
Re:Gov.uk drops jQuery from their front end
by ulisesrmzroche on Thursday May 19, 2022 @03:27PM
(#31438979)
that crap is solved in a lot of places, jQuery is no longer the only library, and you don't need to support legacy browsers as much anymore, if at all
Companies are getting more security-conscious because of all the hacks and the pain of keeping old browser support is no longer outweighing the risks of upgrading is my theory.
Re:Gov.uk drops jQuery from their front end
by psnehanshu on Thursday May 19, 2022 @04:37PM
(#31439851)
There are tools like babel (even typescript) which can help you support older browsers.
Re:Gov.uk drops jQuery from their front end
by dspillett on Thursday May 19, 2022 @07:33PM
(#31441581)
For personal projects I'm far beyond caring about ancient browsers. In DayJob well hopefully soon be dropping support for IE completely. Unless someone is specifically paying me to care then I don't need help supporting truly legacy UAs.
Jr devs have the tendency then to discard jquery because "is old" not because it isn't working anymore.