Good repost.
I loved jQuery, and still do (2019)
151–160 of 189 posts
Re: I loved jQuery, and still do (2019)
#152Earlier quoted context omitted.
Basically what Dragonwriter said. Without getting into the weeds of where webdev was and where it is now, we have made some massive progress. One of the huge improvements was moving to JS compilers (Babel/Typescript/Flow) that normalized features so all browsers going back to IE11 could be reliably supported with the latest language standards. When you just sling jQuery on a page and try to use spread syntax or async…
Right, I get that. What I don't get is why Node is a requirement for a JS compiler. Is that just to get the runtime? I'd always thought of Node as a server on top of a V8 runtime. (Thank you for your patience with this backend dev who finds your whole world very confusing.)
Re: I loved jQuery, and still do (2019)
#153I had a big post but deleted it all. I can more concisely say this: The people here saying they still use it have so far demonstrated what I always say. If you're using jQuery, it's time to go back and relearn javascript. Most people should REALLY research the querySelector and querySelectorAll DOM methods. I've always felt that jQuery encourages you to let your skills stagnate and you don't learn what your code is a…
Re: I loved jQuery, and still do (2019)
#154Earlier quoted context omitted.
In your example, switching from jQuery was just a matter of personal preference. There's nothing wrong with that. My original comment left out some context: on HN, a lot of the hostility to jQuery is either cultural or gatekeeping oriented. Cultural opposition is of the 'not invented here' variety, e.g. 'Why use Dropbox when you could do this w/ rsync? Gatekeeping-related opposition is where it's implied that you sho…
That's not how I see jQuery hate. jQuery promotes bad development patterns, AND brings a cost for end users. Developers will do themselves and futures devs a favor by not choosing to use it. Is it really gatekeeping to expect people to be aware of commonly used 10 year old features? I assume developers who share YMNNJQ are just sick of inheriting messy projects built with jQuery. I know I am.
If you do web development as a job, it's your responsibility to stay up to date on what best practices are. With EC2015 being several years ago now, jQuery wouldn't be a learner's starting point today.
Those that developed bad habits during jQuery's heyday a decade ago may still be writing bad code. And it's someone else's job to clean that up. That's the circle of life, and it's hardly exclusive to jQuery users.
Re: I loved jQuery, and still do (2019)
#155Earlier quoted context omitted.
This feels like a false equivalence; how many of those 2000s users were browsing the web on mobile compared to today?
Does 30kb of js really matter on modern phones and modern mobile internet?
Re: I loved jQuery, and still do (2019)
#156Earlier quoted context omitted.
If it's a corporate environment, the standards are different, understandably. But the hostility to jQuery is also primarily concentrated among corporate devs that seemingly cannot imagine that jQuery might be valuable for use cases other than their own. Not every site out there is an database-driven SPA that needs QA review and a deployment pipeline each time an update is made. Lots of sites are just simple WordPress…
> little bit of a facelift Proceeds to download 30kb (compressed) swiss army knife of a library when just a toothpick would do. jQuery is about as much of a gateway to ES6 as pot is to heroin. Devs who still use jQuery have had 10+ years to learn `document/element.querySelectorAll()`. Longer for event listeners.
Re: I loved jQuery, and still do (2019)
#157Earlier quoted context omitted.
Do you develop REST API also....? The fundamental issue is that it binds the server to the client, who must understand HTML structure. It also makes it more difficult to reuse the endpoints in different ways or for new applications. Returning data and letting the client render it decreases coupling and increases flexibility/testability- you can run unit tests on the client for mock data, and run unit tests on the ser…
I don't use Django but I use Ruby on Rails, and turning a server-side rendered page into an API is trivial. Rails requests automatically understand the format of a request and let you specify what do when a specific kind of format comes in: ie. when it's an html request, render this page, when it's a "js" request, render a jbuilder template. ezpz whatever frontend framework you're using has really nothing to do with…
Re: I loved jQuery, and still do (2019)
#158Any suggestions on a jquery-like easy to implement calendar control? That’s the one thing jquery still does better than everything else, at least that I know of.
Re: I loved jQuery, and still do (2019)
#159I had a big post but deleted it all. I can more concisely say this: The people here saying they still use it have so far demonstrated what I always say. If you're using jQuery, it's time to go back and relearn javascript. Most people should REALLY research the querySelector and querySelectorAll DOM methods. I've always felt that jQuery encourages you to let your skills stagnate and you don't learn what your code is a…
Re: I loved jQuery, and still do (2019)
#160Earlier quoted context omitted.
Can you elaborate on what JQuery does for you that you can't do with modern JS features such as fetch and query selectors?
To use an example, I'd much rather do $(".elements").css("color", "red") versus var selector = document.getElementsByClassName('elements'); selector.style.color = 'red';
> document.getElementsByClassName('comment').style
> undefined
You'd need a for loop right there I believe.