Earlier quoted context omitted.
I wish JS would get all the nice jQuery features, like all the css selectors jQuery has, like a nice feature would be when you retive an HtmlElementCollection to be able to apply some transformation to all elements without having to write a for, or make use Array.from and then use forEach. But I agree I would not use jQuery in new project and when possible I would replace jQuery in existing code too.
You can extend HtmlElementCollection prototype with any methods you like. (it's NodeList, btw, what's returned from querySelectorAll)
Gov.uk drops jQuery from their front end
321–330 of 458 posts
Re: Gov.uk drops jQuery from their front end
#322Earlier quoted context omitted.
I sympathize with older devs, my dad is an older software dev. But you kind of do have to be old in order to have outdated knowledge: nobody young is going to learn assembly tricks which worked on MIPS and other past architectures. Older devs and companies not constantly learning new things and updating to best practices is a real phenomenon. On the other hand, anecdotally most older developers actually do keep up to…
Bootcamps such as Hack Reactor (purchased by Galvanize) have curriculum which is basically outdated by 10 years, so you're going to have graduates using var, anonymous self-executing functions as modules that mutate the global scope, and libraries like jQuery and bluebird. If any student leaves that program with a modern perspective of web dev (such as using Redux or even RTK), it will be due to their own personal gr…
Re: Gov.uk drops jQuery from their front end
#323Earlier quoted context omitted.
But the other thing that was life changing about it was how easy it was to make ajax requests! What's the "modern" alternative to jQuery in that regard? I don't do much JS development, but if I needed to make an AJAX request today, my first instinct would probably still be to use jQuery.
Google the Fetch API.
Re: Gov.uk drops jQuery from their front end
#324Everyone here seems to be talking about how great jQuery was for DOM interaction and that's true. But the other thing that was life changing about it was how easy it was to make ajax requests!
But the other thing that was life changing about it was how easy it was to make ajax requests! What's the "modern" alternative to jQuery in that regard? I don't do much JS development, but if I needed to make an AJAX request today, my first instinct would probably still be to use jQuery.
Re: Gov.uk drops jQuery from their front end
#325Earlier quoted context omitted.
Bootcamps such as Hack Reactor (purchased by Galvanize) have curriculum which is basically outdated by 10 years, so you're going to have graduates using var, anonymous self-executing functions as modules that mutate the global scope, and libraries like jQuery and bluebird. If any student leaves that program with a modern perspective of web dev (such as using Redux or even RTK), it will be due to their own personal gr…
This is totally wrong. I hired a couple devs from Hack Reactor years ago and they had tons of lessons based on React and the ecosystem around it.
Hack Reactor has made Redux completely optional and so almost nobody choose it for their projects. This may have been in response to transitioning to an online-only program. If students understand anything on the "React ecosystem" including even Redux, it is due to their own personal ambition. If you see Redux explicitly listed in their curriculum, do not be confused.
If you see students with Next.js, RTK, or any other framework or library from the React ecosystem on their portfolio, that is due to their own grit.
Re: Gov.uk drops jQuery from their front end
#326Earlier quoted context omitted.
> 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…
This is a fair criticism of how I chose to tell the story. The line you quoted was supposed to refer to the character introduced in the second paragraph and not to a generic stereotype of aged man. I can see how my choice of wording created an implication that people who have grey beards are old and that it is this oldness that contributes to their unwillingness to learn. The familiar cliche of "you can't teach an ol…
Re: Gov.uk drops jQuery from their front end
#327Earlier quoted context omitted.
document.querySelector('html') And for React: https://javascript.info/custom-elements
And you would replace $.getJSON by how many lines?
Re: Gov.uk drops jQuery from their front end
#328When 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…
Re: Gov.uk drops jQuery from their front end
#329I've used jQuery at 2 of the 3 companies I worked for. It can take you very far. Frankly some of the critical features, like making selecting element easier/shorter, should have been ported into JavaScript long ago. I think jQuery is still around largely because it makes, otherwise vanilla, JavaScript easier to use.
Re: Gov.uk drops jQuery from their front end
#330Earlier quoted context omitted.
I'll admit I'm a bit out of practice with the state of vanilla JS, but it seems like you'll be re-inventing the wheel for simple stuff. Like a collapsible section that's lightly animated. I worry too about people not considering accessibility. A lot of my bugs day to day is not being able to tab into things like hover menus or being able to activate buttons because someone forgot to consider correct event callbacks.…
I worry too about people not considering accessibility. This isn't a complaint you can level at the gov.uk team. They're obsessed with accessibility. Gov.uk is probably the best example of a well-designed, well-built, completely accessible website on the whole internet.