News for hackers. Stuff that matters.
Re:jQuery 4.1.0 by noduerme on Tuesday November 17, 2026 @10:42PM (#50541590)
The composability of jQuery has been an inspiration for the way I design my own frameworks and tools.

One thing I still regularly use jQuery for, though, that's rarely mentioned, is its event model. You can put a listener on any object, not just things in the DOM. Any data object can trigger an event. This is incredibly powerful for isolating logic from DOM elements and events. A frequent use case is for DOM elements to contain a reference to a data object that may be replicated elsewhere on the page. The data object sets up and tears down visual elements, listening for interaction, then dispatches a custom event. Your core logic listens for events on the data object instead of on every individual element that might refer to it.

I wrote my own implementation of this a long time ago, but in the end, that feature plus the other ergonomics of jQuery still make it my go-to today over vanilla js. And pretty much everything I write is without any reactive framework (other than my own vanilla component/templating/remoting system), so the overhead is barely noticeable.

Re:jQuery 4.1.0 by devsda on Tuesday November 17, 2026 @11:17PM (#50541803)
> The composability of jQuery has been an inspiration for the way I design my own frameworks and tools

Not just as a framework but its documentation is also probably an inspiration for later libs. It was the first site for me where you could see the code and the result together on the same page at the same place. And the discoverability of the widgets was also great and exciting in a way.

Just open the firebug console, and try the examples for selectors, callbacks etc.

Re:jQuery 4.1.0 by goertzen on Wednesday November 18, 2026 @08:42AM (#50546218)
gotta say i really appreciate comments like this* on hn.

* brief snapshots on what’s interesting, valuable and good about some random thing

thx for sharing and taking the time to write it noduerme