Live data from Hacker News

jQuery 3.6.0

blog.jquery.com

171–180 of 292 posts

Re: jQuery 3.6.0

#171

Earlier quoted context omitted.

I remember when I was in uni that the $() must've had a special meaning or something. I was pretty convinced that the $ was some tough mathematical operator or computer science concept that I didn't yet understand. When I learned that it was simply a function invocation that returned a jQuery object so you could chain it, I was absolutely shocked about the simplicity of that statement. Beginning developers sure like…

There's so much magic in programming that as a beginner, it's hard to know which magic you should dig deeper into, vs which is such a treacherous rabbit hole you're better off cargo culting.

It think this is true of many technical things. Statistics, sailing, car mechanics, photography... What I love about HN is it often gives clues as to which are the interesting rabbit holes.

Re: jQuery 3.6.0

#172
post #6

Do people still use jQuery? I thought the biggest advantage of this library back in the day was css selector access of DOM nodes (back when we only had getElementById, getElementsByClassName, and getElementsByTagName). This has been rolled into the Javascript document api via document.querySelector, and document.querySelectorAll. Also there are browser compatibility issues that jQuery solved but a lot of these are so…

I think it’s like Lisp, or rather the reaction to Lisp. In a world without jQuery every site / devshop uses their own little set of conventions and polyfills (analogous to macros) to add useful abstractions. In isolation, these are neat. En masse though it means that each site has their own meta language (conventions) which have to be memorized before you can contribute to the code base. Languages like Ruby and Lisp…

Or just people who have a poor memory, or who are not very self consistent. I love things like jquery (and Django and other opinionated frameworks) because it saves me the hassle of having bike shed trivial details for myself and then remember them later. And naming things is one of the two hard problems etc...

Re: jQuery 3.6.0

#173
post #6

Do people still use jQuery? I thought the biggest advantage of this library back in the day was css selector access of DOM nodes (back when we only had getElementById, getElementsByClassName, and getElementsByTagName). This has been rolled into the Javascript document api via document.querySelector, and document.querySelectorAll. Also there are browser compatibility issues that jQuery solved but a lot of these are so…

I'm trying to wean off of jQuery to reduce dependencies, but it makes me appreciate jQuery all the more. The native JS API is quite a bit more verbose and cumbersome to use, and my absolute biggest gripe with it is that it doesn't even build on modern JS features. It's not compatible with for...of, map, filter, find, etc, which seems really strange for a relatively recent vanilla JS API. Ironically, http://youmightno…

What I don't understand is why the modern js api didn't just adopt query's conventions... they're so much nicer and more expressive most of the time.

Re: jQuery 3.6.0

#174
post #91

Earlier quoted context omitted.

Well, Wordpress and Drupal still uses jQuery, they auto load it by default and there is no reason not use at this point, unless you specifically building React or some other custom thing on top of either of them.

The Django ecosystem still has a pretty strong tether to jquery. It’s a problem.

What's the problem?

Re: jQuery 3.6.0

#175
post #127

Earlier quoted context omitted.

Yeah, but redux etc gained traction with React, and together they make SPAs good.

SPAs were perfectly good before with ExtJS and similar, and more easily extensible too.

SPAs were never good, the entire notion of them or shoehorning full apps into a browser is a farce. But, as parent says, that ship has long sailed

Re: jQuery 3.6.0

#176
post #48

Earlier quoted context omitted.

Conversely, looking at how you do it through jQuery after seeing how it is in Javascript gives me the same reaction. The fact that jQuery is usually assigned to the dollar sign definitely doesn't help, especially for beginners. The amount of questions I've answered that stemmed from a fundamental misunderstanding of how Javascript works, all because they learned jQuery instead of Javascript, is pretty significant.

That argument stands true for most frameworks on most platforms. I prefer the dollar sign; it's pervasive and concise.

I disagree. There's nothing about React, Vue or any other framework that I'm aware of that does anything similar to jQuery's dollar sign. The only magically-looking abstraction I can think of is JSX, and that's not only not mandatory but very obviously something that's off the curve. Unlike the dollar sign, which just looks like a special construct of the language.

Re: jQuery 3.6.0

#177

Earlier quoted context omitted.

> IMO, React doesn't bring much to the table in this regard while adding a lot of complexity and heft. Strongly disagree with this. In any complex web application with a lot of components, specially ones where a lot of fixed components can live for a while, React is definitely a massive improvement over vanilla JS or something like Backbone which allows wild west. Imagine state coming from sockets, rest APIs etc wit…

I'm exactly arguing against this Webpack, Typescript, React, etc approach to web development. I'm more productive in PHP + jQuery, a lot due to familiarity, of course, but I'm also a huge believer in a simple stack. If you've 20+ mutually dependent inputs, maybe you need a better UI, not a complex state management framework. If your browser is ultimately executing an untyped crazy dynamic language, is it worth trying…

Make Postbacks Great Again.

Re: jQuery 3.6.0

#178

Earlier quoted context omitted.

> It all seems so crazy to me, but this ship has long sailed. Nope. And it's why Svelte is something that I've been hard adopting because it looks the closest to old-school JS/CSS/HTML while still bringing some of the same capabilities over that I love from React and VueJS. It also runs without a VDOM or a constantly running event loop - both things are incredibly attractive to me. Although it's not a perfect solutio…

I saw the Svelte presentation a few years ago when it was released and my jaw hit the floor hard. That was some cool radical thinking. I haven't used it beyond playing with a few examples, so I can't really tell for sure if it holds up. Everything looks great on the demos. Unfortunately it hasn't caught on, though it maybe be too early to call.

Too early to call.

Wait until Typescript is properly supported.

Re: jQuery 3.6.0

#179
I super love jQuery. The proliferation of SPA is super unfortunate, maybe one day the pendulum will swing back to server side HTML with lighter JS for progressive enhancements.

Re: jQuery 3.6.0

#180

Earlier quoted context omitted.

> jQuery is ≈30k gziped and most likely already cached from CDN. This part isn't so true in reality anymore, due to revised browser caching systems[1]. Doesn't mean you shouldn't use jQuery, just that part of the benefits of a centralized CDN are no longer a factor and it's a lot more sensible to self-host. 1: https://www.stefanjudis.com/notes/say-goodbye-to-resource-ca...

Right you are. But jQuery is around the same size as Vue, and that's the lean alternative to React. So the “jQuery is bloat” argument still doesn't make much sense. A single retina hero banner is larger than most JavaScript libraries/frameworks.

Vue is the lean alternative to Angular.
Post reply on HN