Is JQuery Dying?

JQuery is a JavaScript library that serves two main purposes - it provides cross language support for those commands that are different in JScript than they are in JavaScript and it provides a number of useful commands that were missing from both JavaScript and JScript. At the time it was first introduced it did both of these tasks well.

In fact JQuery has been so successful with most of the new commands that it made available that equivalents to those commands have been introduced into JavaScript itself. Perhaps the most obvious of these is the querySelectorAll command added to JavaScript which provides basically the same functionality as the $() selector does in JQuery.

Internet Explorer 8 and earlier can only run JScript and not JavaScript and this is what made necessary the other part of what JQuery does - providing commands that will work regardless of whether the browser supports JavaScript or JScript. With IE9 Microsoft introduced JavaScript support and with IE10 the support for JScript was removed. This means that the death of IE8 will see the death of the need to provide cross language support. JQuery has already recognised this by introducing a new much smaller version of JQuery that only runs on JavaScript. Those sites that don't need to support IE8 users can use the smaller version of JQuery that provides all the same commands but doesn't support browsers that only run JScript.

With the need to test whether the JavaScript or JScript variants of commands are supported gone from the newer variant of JQuery, the main task that version now performs is to test whether the given version of JavaScript supports the equivalent native JavaScript command. If it supports it then it simply acts as a wrapper around that command. If the browser is an older one that hasn't yet implemented the native command then JQuery reverts to using its own code to perform that task.

So as time goes on and the need to support JScript diminishes the need for the old version of JQuery will eventually disappear and once IE8 is dead only the newer smaller version of JQuery will be needed. Also as time goes on more browsers will support the native JavaScript commands that do the same thing as the JavaScript commands do and JQuery will eventually become nothing more than a wrapper around native JavaScript commands (assuming that JQuery doesn't introduce more commands in the meantime).

Eventually all of the useful commands in JQuery will be nothing more than wrappers around native JavaScript commands. Once we get close to where almost all browsers support the native JavaScript equivalents will yet another new version of JQuery be produced that is much smaller than the current small version by just acting as wrappers around native commands? Presumably it would as this would act as a final transition stage for those who have been using JQuery. They would be able to keep their current code intact and each JQuery command that they make would simply call the native JavaScript equivalent command. The library would be really small compared to the current versions as almost all of the code it currently contains would be no longer required.

At this point there wouldn't be any reason for anyone to learn JQuery any more. While those sites already using it might continue to do so, there would be no reason for new sites to use it as each JQuery command could be written as a single native JavaScript command without the need for even the small library that JQuery would be by that time.

Should JQuery completely disappear then it will have been extremely successful. It has provided cross language support for JavaScript and JScript until JScript disappeared and the cross language support ceased to be needed. It has introduced many new useful commands that are so useful that they have been adopted into JavaScript itself. JQuery will have done its job really well if we get to the point where everything it set out to do can be done without it. The death of JQuery will be an indication of its greatest success.


This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow