Upcoming Retro Widget

I’m thinking of writing some kind of widget using only old tools like jQuery. I feel like I need to practice using jQuery for the sake of legacy code. There are some things about jQuery that are pretty cool. The main thing is being able to chain queries together, collect several different wrapped dom elements in the end, and then apply some modifier to all of them in one line. I don’t think the new native JavaScript methods like querySelectorAll offer anything like that functionality.

But do I need to get a book on jQuery? I wonder. I kinda know it the way every front end developer kind of knows it. It’s just a way to grab dom elements using the $([selector]), plus it has various other utilities thrown in like for animation and asynchronous HTTP requests. (I never understood why those things would all be bundled together in a single library.) What I know probably isn’t really enough to say that I “know” jQuery. And the docs are pretty useless. So maybe I need a book.

But I’ve read enough books on programming stuff to know that almost all of them contain very, very little actual content to learn from. It’s mostly just contrived, super-easy examples that I didn’t need help with in the first place. And it would be nice to find some kind of tutorial on the subject that is more recent than 2005.

If I’m going to write something primarily using jQuery, using imperative dom manipulation and all that, I should learn how to do some of the things jQuery is actually good at still. There’s gotta be some reason why Bootstrap requires jQuery (or the lite version) as a dependency. For now I’m going to do some research, see what people think jQuery is good for, and brainstorm some kind of widget that showcases that. Then: it might even be fun to create a little interactive widget using such old techniques—imperative dom manipulation and such.

But can I use kris kowal’s q? Maybe instead I should use only old libraries but also use new JavaScript, like the fetch API. I haven’t learned that yet because it seems totally unnecessary.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s