RIP jQuery: An alternative for modern browsers
Anthony Delgado
Posted on April 15, 2018
RIP jQuery
Two years ago, at the first ever Code Newbie meetup, I had the chance to meet the creator of jQuery, John Resig. At the time I was really starting to double down on my Full Stack Javascript / MongoDB, React, Node journey, coming from a PHP/MYSQL/jQuery world. It was that night when the creator of jQuery got up on stage and told us that he no longer uses the library he created and instead focuses only on React when I told myself it was time to double down on modern Javascript libraries.
Listen, I love jQuery.
jQuery is great, it has allowed me to create amazing front end project, win hackathons and manipulate the dom to my heart's content. But sometimes you get to the point in a mans life that it is time to move on to bigger and better things. So I took the deep dive into the world of React and Node and I didn't look back. jQuery will always have a special place in my heart.
But jQuery is an old dog in a javascript world full of cheetahs and jaguars. It was created when IE6 was the latest browser and IE7 was the upgrade everyone was waiting for. It was release before Google Chrome was even a thing and Adobe Flash was the primary way people created interactive websites. jQuery was revolutionary for it's time, but it has been over 10 years since it's inception.
Which begs the question....
What if jQuery was written today?
Meet Cash. Today I was viewing the source of a friend of mine and reviewing some code and I came across an interesting Javascript library called Cash. Cash is a super small library built for modern browsers (Chrome, Firefox, Safari and Internet Explorer 9+) that provides jQuery style syntax for manipulating the DOM. Utilizing modern browser features to minimize the codebase, developers can use the familiar chainable $ methods at a fraction of the blot. While Cash does not promise to replicate 100% of the features of traditional jQuery it does come close, covering most day to day use cases such as adding / removing / toggling classes and parsing strings of html.
Learn more about the project here: https://www.npmjs.com/package/cash-dom
Is it time that the $ dollar sign made a come back?
Tools like React and Angular are great for modern web applications but do feel like overkill for simple landing pages.
Let me know what you think in the comments section below.
Posted on April 15, 2018
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.