Home jQuip Puts jQuery on a Diet

jQuip Puts jQuery on a Diet

If you’ve wanted a slimmer jQuery, and many do, you might want to look at jQuip.

Demis Bellot launched the project on GitHub earlier this month. The goal for jQuip? According to the GitHub page, “to kickstart jquery.com into re-organizing its code-base so it’s more modular since we believe we’ve proved the most useful parts of jQuery is a fraction of its code-base.”

The What and Why of jQuip

So what is jQuip? It’s a “smaller, lighter, faster, more modular jQuery” that allows developers to include the parts that they want. According to the GitHub page, jQuip includes “90% of the good parts” in jQuery and is broken into several components that developers can include if they need them. A big chunk (three modules) are only needed if you plan to support older browsers. Developers can even use a simple page to generate a jQuip distribution of their own with the features they want.

Bellot says that he started on jQuip while working on a consultancy project, using jQuery on an “interactive datagrid to manage a large dataset in their CRM systems.”

Performance problems in the application led Bellot to start whittling jQuery down to size. The client required IE6 support, but the combination of the large dataset and jQuery’s size were causing the UI to lock up and throw JavaScript timeout errors. So Bellot made a “midnight ditch effort” that was the seed of jQuip.

He says more recent projects led to making jQuip an official GitHub project. “I started developing a ‘3rd party’ drop in widget for work (Careers 2.0) where forcing a jQuery download (even on a CDN) would’ve been too heavy and lead to a degraded experience we wouldn’t be able to completely control (esp. considering the fraction of jQuery we needed).”

Bellot is also working on the ServiceStack Web services framework, and says that embedding jQuery “has a significant effect on the size of the binaries.” jQuip is designed to slim down the size while retaining the jQuery API.

The Future of jQuip

Given Bellot’s dissatisfaction with jQuery, why not work with the project to solve the problems he has? Bellot says that he’s made “no attempt” to coordinate with the jQuery project. “I believe they were heading in another direction (i.e. they get bigger with every release) and I needed a working solution today and couldn’t wait for a future release (if it was coming at all).”

But, he says that he hopes that jQuery will respond to jQuip by restructuring their library “in a more modular architecture so we can only include the parts we want.”

Bellot says that the core functionality in jQuip is already there, though he plans to restore bits needed to work well with Underscore.js and Backbone.js. Both are libraries for developing Single Page Applications (SPA). Anything else, says Bellot, can be included via a plugin. Some features, like abstracted events, won’t be implemented in jQuip at all. Bellot says that it’s rare that they’re needed.

jQuip will also have some features, via plugins, that jQuery doesn’t have. Bellot says that he plans to contribute plugins to jQuip that will make it easier to develop SPAs. He also says he’ll “happily include anyone else’s contributions into the library service,” though developers should make sure they also work with jQuery.

One thing that Bellot is clear on, he’s not looking to compete with jQuery. “I just want to access to a modular jQuery using only the parts I need, whether jQuery.com provides it or I have to maintain it myself. As soon as jQuery provides an option to do this, either by a more modular architecture or some functionality to strip out dead-code I’m happy to maintain it. When they do, the jQuip core will be replaceable but the plugins should be easily portable as they’ll rely on the same jQuery API.”

Bellot is looking for contributors to fill out missing pieces of jQuery and tests. Is jQuip likely to catch on? If you’re using jQuery and looking at jQuip, or taking a first look at jQuip, let us know.

About ReadWrite’s Editorial Process

The ReadWrite Editorial policy involves closely monitoring the tech industry for major developments, new product launches, AI breakthroughs, video game releases and other newsworthy events. Editors assign relevant stories to staff writers or freelance contributors with expertise in each particular topic area. Before publication, articles go through a rigorous round of editing for accuracy, clarity, and to ensure adherence to ReadWrite's style guidelines.

Get the biggest tech headlines of the day delivered to your inbox

    By signing up, you agree to our Terms and Privacy Policy. Unsubscribe anytime.

    Tech News

    Explore the latest in tech with our Tech News. We cut through the noise for concise, relevant updates, keeping you informed about the rapidly evolving tech landscape with curated content that separates signal from noise.

    In-Depth Tech Stories

    Explore tech impact in In-Depth Stories. Narrative data journalism offers comprehensive analyses, revealing stories behind data. Understand industry trends for a deeper perspective on tech's intricate relationships with society.

    Expert Reviews

    Empower decisions with Expert Reviews, merging industry expertise and insightful analysis. Delve into tech intricacies, get the best deals, and stay ahead with our trustworthy guide to navigating the ever-changing tech market.