Live data from Hacker News

jQuery v4.0 Beta

blog.jquery.com

131–140 of 404 posts

Re: jQuery v4.0 Beta

#132

For those of you who are curious what drives jQuery in 2024 and beyond, you need to remember that WordPress is still more than 1/3 of the web, and the majority of installations and so many plugins critically rely on jQuery. Yes, seriously. Any advances to removing deprecated APIs or functions are great. jQuery will probably be around dominantly on the web for years to come.

I don't care what anyone says, jQuery still rocks and is so damn important and influential. You remove jQuery from every piece of software a good chunk of the all the websites stop working all around the Internet.

Yup, hard truths: vanilla JS is far less readable and clunkier than just using jQuery to do the same thing. Also, not everyone needs or wants to move to a shadow DOM framework with a zillion components and high complexity. If you're building a SPA or PWA, yes, absolutely, but for the vast majority of us who use a traditional backend/CMS-driven site with server-side rendering where client-side interactivity is needed, jQuery still does the job really nicely.

Re: jQuery v4.0 Beta

#133
post #88

Earlier quoted context omitted.

Async await fetch lets you flatten your nested callback functions into simple procedural programming. It makes everything much easier to reason about, no more closures and such.

see, this is where i'm not cool with this newness. i've spent years getting away from procedural, and switching to functions, classes/methods. now, we want to get away from that and go back to procedural? that's all fine and dandy, but you're trying to have a new trick conversation with an old dog that just doesn't care. you're bringing some sort of logic to a conversation where it's not needed. it works for me. i do…

surely you still use procedural code within your functions and classes.

the point of await/async is you break down the callback nesting into a single set of procedural code. it doesn't mean all your code is procedural. just that what used to have to be a series of indented anonymous functions or spread all over the place named functions can now be an easy to read concise few lines of code all at the same indentation in a single spot. its an obvious net-win for readability and code maintainability. you are doing yourself no favors by not understanding/embracing it.

Re: jQuery v4.0 Beta

#134
post #67

Earlier quoted context omitted.

One website that almost always gets mentioned when people talk about jQuery today is "You might not need jQuery" ( https://youmightnotneedjquery.com/ ). That site is the best ad for jQuery I've ever seen. For almost every task it describes, the jQuery code is shorter, cleaner, and more intuitive than the vanilla "modern" JS one. And that's after almost 20 years, and I don't know how many billions of dollars invested…

>For almost every task it describes, the jQuery code is shorter, cleaner, and more intuitive than the vanilla "modern" JS one. Just like leftpad.

Instead of needing to import leftpad you have the missing standard js lib

Re: jQuery v4.0 Beta

#135

Earlier quoted context omitted.

If you don't want to use a big framework, then you needn't use any library at all. Nearly everything in jQuery is 1 line of modern JS, no?

Yes, there isn't much reason to use jQuery these days other than keeping with the idioms of a legacy system.

[deleted]

Re: jQuery v4.0 Beta

#136

For those of you who are curious what drives jQuery in 2024 and beyond, you need to remember that WordPress is still more than 1/3 of the web, and the majority of installations and so many plugins critically rely on jQuery. Yes, seriously. Any advances to removing deprecated APIs or functions are great. jQuery will probably be around dominantly on the web for years to come.

Wordpress devs are the plumbers of the tech industry. It’s not glamorous work but there’s a ton of money in it because so many people need them. If I ever decide to retire from latest and greatest hype cycle big tech startup world, I’ll go build Wordpress sites for honest coin and wrap up every day by 3pm.

The fact that Wordpress runs so much of the web sometimes wakes me in a cold sweat. If you're a dev worth their salt and knows proven engineering and design patterns, then Wordpress code is absolutely terrifying to look through.

Re: jQuery v4.0 Beta

#137
post #27

Earlier quoted context omitted.

They just need to add JSX support. Half the reason people use react is because of JSX.

Maybe unpopular opinion but JSX is inferior to something like the Vue templating system. I much prefer to have HTML with some JS sprinkled in than JS that looks like HTML but isn’t.

Most of us devs had "separation of concerns is critical" drilled into us for many, many years. For that reason alone, JSX just gives me the baddest of smells when I look at it.

Re: jQuery v4.0 Beta

#138
Worst part of jQuery is actually upgrading it to a new version, because the api design that made jQuery powerful is also what makes it quite difficult figure out if you broke anything.

Re: jQuery v4.0 Beta

#139
post #89
post #67

Earlier quoted context omitted.

One website that almost always gets mentioned when people talk about jQuery today is "You might not need jQuery" ( https://youmightnotneedjquery.com/ ). That site is the best ad for jQuery I've ever seen. For almost every task it describes, the jQuery code is shorter, cleaner, and more intuitive than the vanilla "modern" JS one. And that's after almost 20 years, and I don't know how many billions of dollars invested…

This is incredible and such a great ad for jQuery. It's almost as if the creator(s) built that site ironically. So many examples are way clearer and easier in jQuery, like this one: JQUERY: $(el).toggle(); IE8+: function toggle(el) { if (el.style.display == 'none') { el.style.display = ''; } else { el.style.display = 'none'; } } Gotta love that "modern" triple attribute repetition. From: https://youmightnotneedjquery…

A more modern solution would be to use classList.toggle() or toggleAttribute(hidden).
Post reply on HN