Live data from Hacker News

jQuery 4

blog.jquery.com

71–80 of 313 posts

Re: jQuery 4

#71
post #61

Everything I ever used jquery for 15 years ago, I found myself able to do with the CSS and the JS standard library maybe 10 years ago. I honestly am confused when I see jquery used today for anything. Is there still anything jquery does you cannot easily do with a couple lines of stdlib?

The terse and chainable jQuery syntax is more readable, easier to remember, and thus more pleasant to maintain. Rewriting for stdlib is easy, but bloats out the code by forcing you to pepper in redundant boilerplate on nearly every line.

Re: jQuery 4

#72

I was surprised that for most of my smaller use cases, Zepto.js was a drop-in replacement that worked well. I do need to try the jQuery slim builds, I've never explored that.

Zepto! That's a name I haven't heard in years. I don't remember how it happened but I'm still a member of the ZeptoJS org on Github.

I really like that project! Why don't y'all hand it over to someone willing to do maintenance or at least archive it?

Re: jQuery 4

#73
post #51

Whenever HTMX comes up here, I always think "isn't that just some gobbledy-gook which replaces about 3 lines of imperative jquery?" Anyway, jQuery always did the job, use it forever if it solves your problems.

These days I’ve moved to native JS, but hot damn the $() selector interface was elegant and minimal vs document.getElement[s]by[attribute)].

While presumably jquery is slower than native selectors, maybe that could be pre-computed away.

Re: jQuery 4

#74
post #51

Whenever HTMX comes up here, I always think "isn't that just some gobbledy-gook which replaces about 3 lines of imperative jquery?" Anyway, jQuery always did the job, use it forever if it solves your problems.

The problem with jQuery is that, being imperative, it quickly becomes complex when you need to handle more than one thing because you need to cover imperatively all cases.

Yeah, that's the other HN koan about "You probably don't need React if..." But if you are using jquery/vanilla to shove state into your HTML, you probably actually do need something like react.

Re: jQuery 4

#75
post #4

Earlier quoted context omitted.

Backwards compatibility. Apparently there are still some people stuck on IE11. It's nice that jQuery still supports those users and the products that they are still running.

This is the part that I find the strangest: > We also dropped support for other very old browsers, including Edge Legacy, iOS versions earlier than the last 3, Firefox versions earlier than the last 2 (aside from Firefox ESR), and Android Browser. Safari from iOS 16, released in 2022, is more modern in every conceivable way than MSIE 11. I'd also bet there are more people stuck with iOS 16- than those who can only us…

> Safari from iOS 16, released in 2022, is more modern in every conceivable way than MSIE 11.

There are likely millions if not tens of millions of computers still running MSIE11. There are likely to be no devices running iOS 16

Re: jQuery 4

#76

Related: This is a nice write-up of how to write reactive jQuery. It's presented as an alternative to jQuery spaghetti code, in the context of being in a legacy codebase where you might not have access to newer frameworks. https://css-tricks.com/reactive-jquery-for-spaghetti-fied-le...

This brought me flashbacks of jQuery spaghetti monsters from years ago, some were Backbone related. In retrospect, over-engineered React code can be worse than decently organized jQuery code, but some jQuery mess was worse than any React code. So I guess I'm saying, React did raise the bar and standard of quality - but it can get to be too much, sometimes a judicious use of old familiar tool gets the job done.

Re: jQuery 4

#78
It's amazing how much jQuery is still used today. Even on modern websites you can often find it included (browser devtools -> jQuery in the console, and see). And not just on hobbyist sites, but on serious company websites and their web tools as well.

Re: jQuery 4

#79

Earlier quoted context omitted.

Jquery does many things in one line that requires a couple lines of stdlib. Writing less code is what libraries are for.

Until you have to upgrade it and it bites you

jQuery's big point was to give a consistent API over inconsistent browser implementations, so it typically saves you from bites more often than it bites you.

Re: jQuery 4

#80
post #75

Earlier quoted context omitted.

This is the part that I find the strangest: > We also dropped support for other very old browsers, including Edge Legacy, iOS versions earlier than the last 3, Firefox versions earlier than the last 2 (aside from Firefox ESR), and Android Browser. Safari from iOS 16, released in 2022, is more modern in every conceivable way than MSIE 11. I'd also bet there are more people stuck with iOS 16- than those who can only us…

> Safari from iOS 16, released in 2022, is more modern in every conceivable way than MSIE 11. There are likely millions if not tens of millions of computers still running MSIE11. There are likely to be no devices running iOS 16

According to Cloudflare, there are almost no users still on MSIE of any version.[0]

Statcounter says there are about 4.6% of iOS users still on iOS 16.[1]

My gut instinct is that there are multiple times more people using iOS 16 today than MSIE of any version.

[0] https://radar.cloudflare.com/reports/browser-market-share-20...

[1] https://gs.statcounter.com/os-version-market-share/ios/mobil...

Post reply on HN