Live data from Hacker News

jQuery v4.0 Beta

blog.jquery.com

231–240 of 404 posts

Re: jQuery v4.0 Beta

#231

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.

And many many company internal tools, that won't be rewritten and just get replaced with something better(ReactJS?) over time.

It would be around for long is nice, but you can't make a career using it these days.

jquery, perl just some of those insanely useful tools which get the work done, but they don't pay you well these days.

Re: jQuery v4.0 Beta

#232
post #188

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?

Nearly everything in jQuery is more concise, consistent and composable compared to modern JS APIs. As this site clearly shows: https://youmightnotneedjquery.com/

[deleted]

Re: jQuery v4.0 Beta

#233

Earlier quoted context omitted.

Also, jQuery is awesome. People have been in love with the overly complex and fancy javascript frameworks for the last 15 years or so. But jQuery doing dynamic binding to dynamically generated forms for some error states and maybe an ajax calls is literally all the javascript you need in 99% of web pages and the rest is overkill. The industry is going to move away from the complexities to React and towards more of th…

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?

> Nearly everything in jQuery is 1 line of modern JS, no?

Since JavaScript never actually requires line breaks, yes.

Otherwise, absolutely not. Modern web APIs remain highly statements-based, with little affordance for pipelining / cascading.

Re: jQuery v4.0 Beta

#234
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.

JQUERY: await $.post({ url: '/my/url', data: data }).then(() => {}); VANILLA: await fetch('/my/url', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(data) }).then(() => {}); I know which one I still prefer.

You don't need that then in the fetch example. I don't know about ajax.

Re: jQuery v4.0 Beta

#235
post #154
post #92

Earlier quoted context omitted.

You would just do: const response = await fetch(...) Bam, now you have the response without needing callbacks.

The async/await design is absolute garbage and no one will ever convince me otherwise. `fetch` is a particularly egregious example: it has all kinds of insane random quirks that you need to memorize. For example, how do I handle an error there? What's the obvious way to handle it? Is response null or something? Well, not exactly, you need to check for: response.ok; // false response.status; // 404 Um, okay, I get it.…

I don't see how the design of the fetch API relates to async/await being badly designed, can you explain?

Re: jQuery v4.0 Beta

#237
post #67

Earlier quoted context omitted.

Second to that: jQuery is awesome. Or more specifically: the idea that websites can be built with vanilla HTML, CSS, and _optional_ JS. jQuery embraces progressive enhancement and separation of concerns pattern, which is quite the opposite of how websites are built these days. Web development starts with 10+ React import statements for components, CSS, images, and whatnot. JavaScript is a must, not optional.

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…

Much of the billions are used to make JavaScript worse. E.g. ESM is a byzantine mess compared to CJS, and the ceremony and bondage of TypeScript is dramatically increasing busywork.

Re: jQuery v4.0 Beta

#238
post #67

Earlier quoted context omitted.

Second to that: jQuery is awesome. Or more specifically: the idea that websites can be built with vanilla HTML, CSS, and _optional_ JS. jQuery embraces progressive enhancement and separation of concerns pattern, which is quite the opposite of how websites are built these days. Web development starts with 10+ React import statements for components, CSS, images, and whatnot. JavaScript is a must, not optional.

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…

Yesterday I was checking HN from 10years±2weeks ago and guess what the top posts were... "Why you need jQuery" and "You might not need jQuery". I'm too young to know about those days but I guess not much has changed in relation to people's attitude towards jQuery.

Re: jQuery v4.0 Beta

#239
post #41

I'm consistently surprised by the commenters on HN who seem to think jQuery is just a DOM selection library, when in fact it is a widely supported, incredibly stable tool set for (yes) DOM selection, but also attribute manipulation, Ajax requests, event handling, animation, and general utility functions. What's more, where there _is_ native functionality that replaces jQuery, the API is never as fluent. For work that…

yes and far easier to drop jq into a project. no need for build tools and all headache. (i know you do that with react but its not comparable features).

You don’t run your JS through babel or minification?

Re: jQuery v4.0 Beta

#240
post #206

Earlier quoted context omitted.

You still need some kind of application framework. Jquery is just a low level utility. But higher level you need to maintain architecture. Specially in spa's

You don't "need" an application framework. People have been building websites (even SPAs) before the 2010s and they didn't "need" these frameworks. Given what we know today, I'll grant you that in some cases people would want to use a framework, but it's hardly a necessity unless the context provides more specific requirements.

you don't "need" a framework for backend development, too, but most people find it highly convenient
Post reply on HN