Live data from Hacker News

Gov.uk drops jQuery from their front end

web.dev

251–260 of 458 posts

Re: Gov.uk drops jQuery from their front end

#251

I'm new to web-dev. Having read the vast majority of comments it seems some people think jQuery is unnecessary/obsolete. Others say it's API is better, more concise, more flexible, etc. As a newbie I decided to learn vanilla JS as I was too confused with the state of the various frameworks; I mean what one would you choose to start with? That said I'm interested in what jQuery can do that vanilla JS can't.

Try Svelte, it's amazing!

I never consciously made a decision to stop using jQuery, but after moving to frameworks like Svelte, there's just not a need for it most of the time (it's been years since I last added jQuery to a project, and I think that was only because I was using some third party lib that depended on it). YMMV of course.

Re: Gov.uk drops jQuery from their front end

#252
bullshit. there are tons of images in this site most are above 10kb, there are several images I could find which are above 20kb.

Jquery is passive, just loading jQuery in the page itself doesn't do any harm. could be some plugins they are using might be doing something unnecessary.

Re: Gov.uk drops jQuery from their front end

#253

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.

Nobody "hates" jQuery. Code and libraries are a liability. All people care about is getting their job done and going home.

This "trend" has been like 5+ years in the making. And it's simply a result of jQuery becoming less necessary as core JavaScript in the browser gains features.

Re: Gov.uk drops jQuery from their front end

#254

I'm new to web-dev. Having read the vast majority of comments it seems some people think jQuery is unnecessary/obsolete. Others say it's API is better, more concise, more flexible, etc. As a newbie I decided to learn vanilla JS as I was too confused with the state of the various frameworks; I mean what one would you choose to start with? That said I'm interested in what jQuery can do that vanilla JS can't.

jQuery is very comfortable and succinct for some DOM manipulation here and there. That is, when you need to sprinkle HTML with a bit of JavaScript.

But if you're starting today and want to have it easy in your career, learn React or Vue. They pay better and they look good in your CV. And I say that as someone who likes jQuery.

If you want to bet on something new, I suggest https://kit.svelte.dev or https://www.solidjs.com

Re: Gov.uk drops jQuery from their front end

#255

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…

> But to me, they are like the old grey beard who didn't update his knowledge as the times changed. Maybe it's just me but with all the rampant age discrimination nowadays in tech, I really don't like to see the continued propagation of this stereotype. All sorts of people of all ages are unwilling or unable to update their knowledge of new tech, there is no reason to link this characteristic to someones advanced age…

It was just a reference to the person in the story, not an allusion to "because he was old he didn't try to update his knowledge/continue learning".

Re: Gov.uk drops jQuery from their front end

#256

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.

One particular reason is that it can be hard to avoid or get rid of, if you are using third party UI modules- even "modern" ones, intended for use in a framework like Angular, might use jQuery as a dependency.

This is also problematic if your project has a dependency tree that needs multiple (incompatible) versions of jQuery.

Re: Gov.uk drops jQuery from their front end

#257

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…

> But to me, they are like the old grey beard who didn't update his knowledge as the times changed. Maybe it's just me but with all the rampant age discrimination nowadays in tech, I really don't like to see the continued propagation of this stereotype. All sorts of people of all ages are unwilling or unable to update their knowledge of new tech, there is no reason to link this characteristic to someones advanced age…

The OP doesn't link the characteristic to their example's age.

Re: Gov.uk drops jQuery from their front end

#258

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…

when you say veteran do u actually mean veteran of a real life combat war who later joined the games industry or veteran of the games industry

Re: Gov.uk drops jQuery from their front end

#259

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…

For everyone of these "grey beard" stories I can point you to a "young gun" story involving a fad of the week framework that's just over complicated and over engineered and doesn't even solve anything.

A long time we had a really good engineer who can crack topcoder and coding challenges with ease. We had a problem where we had to collect all changes to the User models and send it to the marketing platform. It was initially implemented in Rails Active Record which took progressively more time to collect and sync changes. Rails was hot at the time and SQL was really frowned upon. A lot of developers to this day hate SQL. Then came a "grey beard" who simply rewrote the whole thing into a single complex query that let the database figure out the optimum way to find the exact same data. Total time went from over 10hrs to 10mins.

Re: Gov.uk drops jQuery from their front end

#260
post #164

Earlier quoted context omitted.

What? Web APIs are one of the most stable APIs in existence. "Don't break the web" is taken very seriously.

The context for this belief has only existed for about 10 years now.

More like half of that. I did web development in 2012. We couldn't have done it without jQuery.
Post reply on HN