Discussion

Sign in or Join to comment or subscribe

2020-10-30T20:24:52Z ago

WOW! Well, I’m honored that you dedicated a segment of your show to my listener question. Thanks! A few random thoughts …

  • LOVE the jquery poems! Rewound to listen them twice. (tho Jerod, I won’t be calling JQuery.fadeOut() anytime soon)
  • I kinda threw Emma under the bus. Sorry Emma!
  • Such great, thoughtful input from all panelists.
  • Y’all touched on it, but jquery gets blamed for spaghetti code. JQuery was never meant to be an architectural tool…and spaghetti code is not even close to being unique to jquery :D
  • Nice coincidence that Gleb Bhamutov was on last week. jquery (and it’s influence) is obviously a big part of cypress and IMHO is why cypress is so fun to use.
  • this might not be 100% true, but a gzipped, Sizzle-less jquery 4 is supposed to be about 17k. For comparison’s sake (and I know they are very different libs), the current version of lodash gzipped is 23k. One could feasibly use jquery as a convenience library without feeling bad about it. (Though I do this now and don’t feel bad about it)
  • Unless the DOM goes away, we’re going to have DOM needs. And we can all agree less hand-crafted code is better. I will take stuff like $(’.whatever).on(‘click’, myfunc) over document.querySelector(‘.whatever’).addEventListener(‘click’, myfunc, false [I guess?]) every day of the week.

Thanks again, great show!

Jerod Santo

Jerod Santo

Omaha, Nebraska

Jerod co-hosts The Changelog, crashes JS Party, and takes out the trash (his old code) once in awhile.

2020-11-03T16:11:40Z ago

It was a great idea for a conversation! This is why I am always mentioning the request form. Y’all come up with better show ideas than we ever can.

Like I said on the show, there should be no shame in the jQuery game. Do you need it today? Not really. Should you use it if it makes you more productive, helps you write less bugs, and that trade-off is worth the additional page weight? Absolutely.

One thing I’d suggest trying, though, is the next time you start a project where jQuery would be a nice fit… start by implementing your own $ function that wraps querySelector, addEventListener, etc. Because:

  1. It’s actually pretty fun
  2. You’ll likely learn a thing or three doing it
  3. It’ll weigh next-to-nothing

After doing that for awhile, you may find that you need more of what jQuery offers than is worth implementing yourself. But if you’ve maintained API-compatibility, it’s an easy switch from there.

Thanks again for the show idea and the thoughtful comments here! 💚

0:00 / 0:00