Live data from Hacker News

I loved jQuery, and still do (2019)

withblue.ink

151–160 of 189 posts

Re: I loved jQuery, and still do (2019)

#152

Earlier 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.)

Node is required for a lot of modern webdev tooling because (a) Node and NPM are usually bundled together and (b) people who write tools for JS development usually like to write the tools in JS too.

Re: I loved jQuery, and still do (2019)

#153

I 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…

If you're still using jQuery, maybe you don't enjoy web development, and you should do something you enjoy instead.

Re: I loved jQuery, and still do (2019)

#154
post #95

Earlier 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.

> jQuery promotes bad development patterns

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)

#155
post #29

Earlier 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?

Since many people seem to be religious today about which "packer" is the best and that using one in the first place is a necessity, the answer is apparently "yes".

Re: I loved jQuery, and still do (2019)

#156
post #101

Earlier 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.

The modern web is a soup of React, Vue and Angular packages with numerous dependencies. Couldn't they just use jQuery UI?

Re: I loved jQuery, and still do (2019)

#157

Earlier 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…

Confirmed this is also trivial with Django, have done it to my crud, and even have a view that parses my url router for views and return an openapi definition with a swagger ui.

Re: I loved jQuery, and still do (2019)

#159

I 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…

It´s been a while since I coded some front-end. What about issues with different browser implementations? jQuery used to handle those discrepancies.

Re: I loved jQuery, and still do (2019)

#160

Earlier 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';

Sorry, that doesn't even work:

> document.getElementsByClassName('comment').style

> undefined

You'd need a for loop right there I believe.

Post reply on HN