Live data from Hacker News

Gov.uk drops jQuery from their front end

web.dev

241–250 of 458 posts

Re: Gov.uk drops jQuery from their front end

#241

When I first started programming I was pretty lucky to get a job at a games company. My first lead was a veteran who had shipped a lot of AAA titles and he loved his war stories. He was personally interested in performance and he would often cite hardware timings for specific cpu instructions. One story he told a couple of times was about some grey beard who was before his time. The grey beard was once a legend in th…

Amusingly, I always joke that I'm fluent in jQuery, but no absolutely no javascript. As a mostly backend go/python/non-javascript developer that has always held true.

It is just a tool in the belt for an engineer. Can you use jQuery in 2022 or later to solve really amazing problems that impact user experience? You sure can! Would you be better off to use a modern javascript variant and stuff like react instead? You also absolutely would.

So just because a tool is old doesn't mean it can't be used to solve real user problems. There are still banks and airlines that run COBOL, and as a user, do you really care that much? I'd take "knows $insert_older_less_hip_tech_here" as experience of having done something for awhile.

Now if I was asked to write a front end today, I'd have to sit down and properly learn react + typescript (because javascript is awful without sensible type checking), and that would add to the time to ship, but is the correct thing to do.

Re: Gov.uk drops jQuery from their front end

#242
post #239

When I first started programming I was pretty lucky to get a job at a games company. My first lead was a veteran who had shipped a lot of AAA titles and he loved his war stories. He was personally interested in performance and he would often cite hardware timings for specific cpu instructions. One story he told a couple of times was about some grey beard who was before his time. The grey beard was once a legend in th…

I think you're greatly exaggerating the death of jQuery > old trick's won't work > writing is on the wall jQuery still works and is used in an crazy amount of websites. It's not going away soon. The biggest downside is the extra network request, but it's probably cached in 99% of browsers, so all that's left is some extra CPU time. You're also exaggerating the claims of jQuery defenders. No one here is arguing that t…

Chrome started partitioning the cache a couple years ago to mitigate timing attacks, so there's no network savings anymore when a bunch of sites all link to the same jQuery cdn entry.

Re: Gov.uk drops jQuery from their front end

#243

When I first started programming I was pretty lucky to get a job at a games company. My first lead was a veteran who had shipped a lot of AAA titles and he loved his war stories. He was personally interested in performance and he would often cite hardware timings for specific cpu instructions. One story he told a couple of times was about some grey beard who was before his time. The grey beard was once a legend in th…

What newer libraries are you using for performance gains?

Re: Gov.uk drops jQuery from their front end

#244
post #32

Earlier quoted context omitted.

That's the problem. It takes only 1 minute to write a wrapper, so you will write one, and I'll write one, and your dog will write one.

Then compare it with dog's and pick the simpler one :) I don't know what's wrong with a utils.js file that only has what you need in a way that fits your project exactly. Woof.

But writing that utils.js will end up rewriting jQuery.

Re: Gov.uk drops jQuery from their front end

#245
post #21

Earlier quoted context omitted.

I loved jquery back in the day. It made web development bearable in a time when it was a clusterfuck. I think a lot of people owe a lot of thanks to jquery. But in 2022 vanilla javascript is all you really need.

Web development is still a clusterfuck.

I agree if you are talking about frontend. Backend is still pleasant. And even frontend becomes bearable thanks to HTMX.

Re: Gov.uk drops jQuery from their front end

#246

Earlier quoted context omitted.

As a counterpoint, I had a similar conversation with a report of mine about jQuery. He said it was not necessary and you could just use vanilla js. I said while yes that's true as a dev if I told you I needed you to implement a new payment provider for billing would you tightly and directly align with who we used or abstract it away via some wrapper so that if we ever had to change it wouldn't be difficult? Of course…

jQuery was a useful abstraction when browsers had inconsistent and clunky apis. Modern browsers have apis that are about as convenient as jQuery's, are standard across browsers, consistent with the language, and guaranteed to outlive jQuery the library. Aside from dot-chaining in a monadic sort of way, jQuery offers no benefit to the developer, while costing about 30kB of javascript.

> guaranteed to outlive jQuery the library

There's absolutely no reason to believe that considering those APIs add new features independently of each other. A library like jQuery can serve as an intermediary if browser A implements new feature X that is possible in browser B but through excessive (and slow) DOM manipulation.

jQuery can act as a bridge between the time browser A's implementation and browser B's.

Re: Gov.uk drops jQuery from their front end

#247
post #239

Earlier quoted context omitted.

I think you're greatly exaggerating the death of jQuery > old trick's won't work > writing is on the wall jQuery still works and is used in an crazy amount of websites. It's not going away soon. The biggest downside is the extra network request, but it's probably cached in 99% of browsers, so all that's left is some extra CPU time. You're also exaggerating the claims of jQuery defenders. No one here is arguing that t…

Chrome started partitioning the cache a couple years ago to mitigate timing attacks, so there's no network savings anymore when a bunch of sites all link to the same jQuery cdn entry.

I believe Safari has been doing it since 2013.

https://bugs.webkit.org/show_bug.cgi?id=110269

Re: Gov.uk drops jQuery from their front end

#248

When I first started programming I was pretty lucky to get a job at a games company. My first lead was a veteran who had shipped a lot of AAA titles and he loved his war stories. He was personally interested in performance and he would often cite hardware timings for specific cpu instructions. One story he told a couple of times was about some grey beard who was before his time. The grey beard was once a legend in th…

jQuery is dead, Netcraft confirms it?

"Nobody goes to that restaurant anymore, it's too busy."

Re: Gov.uk drops jQuery from their front end

#249
I've noticed this a trend lately. Why does everyone suddenly hate jQuery?

Instead, I've noticed everyone re-inventing the wheel. Take Bootstrap5, which "eliminated jquery and we wrote our own!" but now, it is much much larger. Then your next framework does the same, and so on, now we're downloading 1mb of javascript files just to display grandma's 160 byte tweet.

Re: Gov.uk drops jQuery from their front end

#250

Earlier quoted context omitted.

I don't; it was an improvement when BackboneJS came out so I could reason about larger scale applications, and another improvement when AngularJS came out so I could build and write tests for logical, reusable components, and another when React (especially in 2022) was there and reduced these components to simple JS functions. That said, I don't like how complicated modern day front-end development is, to the point w…

Oh god, Backbone. I absolutely hated that framework. It didn't even seem to do anything, it seemed like I had to implement all of the logic myself. Except I had to do it their way, for some reason, and practically nothing made sense. (I haven't touched it in years, though, so my memory is probably distorting my experience) I like the idea of React, just not what it has turned into. The amount of tooling that it has c…

HTMX + custom elements + Alpine.js = love
Post reply on HN