jQuery 3.0 & jQuery Compat 3.0 are announced

If you’re working in web development you probably fit into one of two categories of developer: You think jQuery is the best thing since sliced images and you couldn’t get through the week without it; or, you think jQuery is a bloated crutch used by people too lazy to learn real JavaScript.

However you feel about jQuery, there’s no denying the impact it has had on the industry, and the changes rung in by the Web’s most popular JavaScript library. So this week’s announcement of jQuery 3.0 is a significant milestone in the history of front-end development.

jQuery 2.1.1 will be succeeded by jQuery 3.0.0, jQuery 1.11.1 will be succeeded by jQuery Compat 3.0.0. They share a version number because their public API is the same, the latter is for maximum compatibility with browsers, the former is for maximum performance.

Before you rush to update your sites, jQuery 3.0 isn’t out yet, it’s in the planning phase. But it does mean that jQuery 2.0 is probably done with, and any little foibles are there to stay.

More importantly, it also means that anything built with jQuery 2.1.1 will not necessarily continue to function in 3.0 because whilst minor versions are backwards compatible, major versions are not necessarily so. This was highlighted by Dave Methvin’s blog post announcing the update.

Why does this matter to developers? If you’ve been importing jQuery from Google you’re probably requesting a specific version, or at least a specific major version. If not, 3.0 will potentially break your site. But there’s a bigger problem at hand; with the update to version 3.0, thousands of third party products that utilize jQuery will rush to upgrade to the latest version (for largely marketing reasons).

The rush to implement jQuery 3.0 is likely to cause a domino effect of updates, some of which are bound to be problematic.

jQuery cannot remain as-is, or it will inevitably become obsolete. It has to update its code to respond to changes in demand and technology. By highlighting the next revision as a major update, they’re doing the responsible thing by anticipating probable API changes and they’re making it public early enough for everyone to have plenty of warning.

What developers need to do is ensure that they’re specifying a major and minor version of jQuery when importing, and ensure that any 3rd party scripts they use do the same.

Benjie Moss is editor at DeveloperDrive. He's usually training for a marathon. You can follow him on Twitter @BenjieMoss. More articles by Benjie Moss
Home CSS Deals HTML HTML5 Java JavaScript jQuery Miscellaneous Mobile MySQL News PHP Resources Security Snippet Tools Tutorial Web Development Web Services WordPress