Live data from Hacker News

jQuery 3.6.0

blog.jquery.com

251–260 of 292 posts

Re: jQuery 3.6.0

#251
post #195

Earlier quoted context omitted.

One thing that doesn't help jquery's case is that it and its plugin ecosystem isn't modular, making it impossible to trim the code size below the minified size via dead code elimination or even es6 partial imports. It would be nice to see more fluent DOM apis like jquery, but having 1st class support for es6 modules so you can import only the functionality you need in your final bundle

ZeptoJS has a modular build tool, allowing you to select only the desired modules https://zeptojs.com/

So does jQuery by the way; you can use some flags to grunt to enable/disable parts you don't want. The README has some docs on this.

Re: jQuery 3.6.0

#252

Earlier quoted context omitted.

I remember the first time I used VueJS after being a long time JQuery developer. It was incredible how much power VueJS and similar frameworks put in your hand using such simple concepts. Not having to add event listeners to everything and manually re triggering things is revolutionary. I was building dynamic UIs with ease that would have been massive and bug prone jobs in jquery.

do you use the full spa framework, or just use vuejs like jquery(use script to include it in each page)? whenever you have to do vuejs full SPA framework it comes with quite some concepts which takes (a lot) time to digest and stay up to date.

For that project I just imported it on to a single page to build one particularly complex (for me) feature. It was a little news letter builder which generated a JSON string for the config and saves it to the db. The backend could then use that config to send emails.

I was getting nowhere with jQuery. My final solution in vue was tiny compared to just setting up all the event listeners on the first try.

Re: jQuery 3.6.0

#253
post #54

Earlier quoted context omitted.

I never understood why people say “We’ve solved your jQuery problem” by introducing getElementsByClassName() or even querySelector(). When I come back to my older app, $(“.my-class”) is still much nicer. jQuery gets out of the way, the class gets syntax-highlighted, and .focus() can’t create an NPE.

I know it doesn't replace jQuery, but this is fairly straightforward: $ = document.querySelector.bind(document) $$ = document.querySelectorAll.bind(document)

It's annoying that it returns a NodeList which doesn't have some common array-y methods and the like. While these aliases are certainly convenient, the jQuery semantics are much nicer and more intuitive IMO.

Re: jQuery 3.6.0

#254

Earlier quoted context omitted.

>Do people still use jQuery? Oh yes. Everyday. Still love it. >…Javascript document api via document.querySelector, and document.querySelectorAll The jQuery API is still (and probably aways will be) far superior to the native DOM (terser, composable, more expressive, etc). >…smaller footprint libraries like lodash jQuery is ≈30k gziped and most likely already cached from CDN. >…has fallen out of favor of more compreh…

> 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 think it's underestimated, how far you can get with a simple dispatch loop, a state tree, and some judicious OO sprinkled in for client widget-bullshit events/lifecycle. I'm not saying it's better than React, but it's underestimated.

Re: jQuery 3.6.0

#255
post #233

Earlier quoted context omitted.

Svelte uses the dollar sign. https://svelte.dev/tutorial/reactive-declarations

Wow, that looks weird. Thank you, I hadn't heard of Svelte before.

No one blames you for not knowing about the 18275th javascript framework.

Re: jQuery 3.6.0

#256
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…

>Do people still use jQuery? Oh yes. Everyday. Still love it. >…Javascript document api via document.querySelector, and document.querySelectorAll The jQuery API is still (and probably aways will be) far superior to the native DOM (terser, composable, more expressive, etc). >…smaller footprint libraries like lodash jQuery is ≈30k gziped and most likely already cached from CDN. >…has fallen out of favor of more compreh…

Smaller footprint in my mind doesn't refer to download size which is minimal in either case but the footprint or impact on a project. IMO It is way harder to move off of jquery once it has been fully utilized throughout the project than to swap a single function to/from lodash once a core API has a better way of handling it. Using JQuery demands you buy into the whole ecosystem whereas Lodash is modular.

Also as others have mentioned caches are individually isolated for each domain now to prevent tracking/data leaks.

Re: jQuery 3.6.0

#257

JQuery and reading Resig's book and viewing the source code are responsible for lifting me from horrible dev to below average dev:-) I learned to extend the library and understood to create some minimal libraries for myself. It can be very useful to this day and is almost a ballerina when comparing the bloat of other frameworks or library stacks. You never know maybe the come up with something better than react.

> reading Resig's book I hope you mean the JS ninja one because I just bought it week. Do you remember a particularly impactful section?

The one I have meant was "jQuery in action", at the time that left a bigger impact as far learning is concerned. The jQuery team had promises and other things long before they became part of the standard API, he explains how they made it work.

However, secrets of a js ninja is very good as well, touches newer things like generators and es6, es7 features.

Re: jQuery 3.6.0

#258

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

considering the size of frameworks like react, it's basically a "nothing" download. I've seen people spend more bandwidth on rounded corners.

React with react-dom is like ~35kb gzipped

Re: jQuery 3.6.0

#259

Are CSS Frameworks like Bootstrap still using jquery? Otherwise I don't see the use case of it now that we have so many JS frameworks plus Javascript as a language has changed so much.

Bootstrap 5 dropped jquery but apparently it’s still possible to include it for tooltips and modals.

Re: jQuery 3.6.0

#260
post #132

Earlier quoted context omitted.

From your FAQ > No. Prices will never increase. Unlike other companies, we will never shutdown our service either. How can you guarantee this?

There are only two ways I think this can work. Their price completely covers every user signed up at any scale. If they lose all but 1 customer, that customer can keep the lights with just their subscription. The other is that company has such a large warchest it'd be impossible to run out of money.

I would not start this business if I could not keep it going. Period. Even beyond my lifetime. I keep things simple - when I started I had so many struggles, and wish something like this existed. I have contingency plans in place if something happens. My philosophy is outlined in the documentation for Lad.
Post reply on HN