You are here
Spotlight on jQuery
At Captovate we like to keep an eye on emerging trends in technology. Historically, we've been quite successful at adopting the right technologies at the right times. In this post I'm going to look at one technology that, even in the context of other successful technologies, is very much an outlier. This is the Javascript framework jQuery, which, in less than five years, has grown to become a major framework for Javascript development.
What is it?
Javascript is a programming language that, among other things, can be used to write programs that are run within a standard web browser. It complements the capabilities provided by HTML and CSS to allow web developers to implement custom functionality that lies outside the scope of HTML and CSS alone. A Javascript framework is package of Javascript functions designed to handle some tasks that come up again and again in web development, such as building an interactive calendar widget or low-level manipulations of the DOM (page structure). Utilising frameworks means that a lot of the time we don't have to re-invent the wheel, which in turn means faster development times and fewer bugs. jQuery is currently the most popular of these frameworks.
How popular is it?
Recent technology surveys put jQuery usage for the top 10,000 most popular websites at over 40%, and there are a number of indications that this figure will continue to grow in the near term. jQuery deployments have grown steadily since its inception in 2006, and its popularity as a search term has enjoyed similar steady growth. Also, deployments are more prevalent in higher ranking sites so we would expect these figures to grow as smaller sites try to catch up and utilise the technology of popular sites. These indicators, coupled with the fact that more powerful tablet and mobile devices are set to expand the number of devices capable of consuming high end web content dramatically, mean that growth can continue for the foresee-able future.
Why is it so popular?
There are a number of factors that have helped make jQuery successful, and there are equally many robust discussions of these factors on the wider web. Crucially, browser support for Javascript is increasing in leaps and bounds especially in the realm of performance, which has improved twenty fold in the past five years. jQuery also doesn't try to do too much, it just takes the most commonly encountered situations and provides efficient, reliable and simple solutions to the developer.
The one advantage that is probably the most significant to me in my day to day work is that jQuery is a great unifying technology. It allows web applications to be coded for a number of browsers and platforms with a minimum of fuss on the part of the developer. It brings together in one framework a number of distinct web technologies such as HTML (via DOM manipulations), AJAX (and JSON), and CSS (via the Sizzle selection engine). The jQuery motto is "write less, do more" and an important corollary of that is that developers have a reduced need to know the quirks of the platforms they're writing for.
Are there any disadvantages to frameworks?
There are some downsides to this merging of technologies. Firstly, the traditional separation between presentation and content is blurred, as both can be manipulated from the same script. Secondly, consumers of web content become more dependant on being able to execute script. This is a particularly significant point for users that may have accessibility issues, and also for automated search engine web crawlers.
My response to the first point is that the line between presentation and content has never been as clear as we web professionals would like to pretend it is; artefacts from earlier incarnations of HTML mean that there is plenty of non-semantic markup in use today. From the other direction, from CSS2 onwards we've had the ability to inject content from within CSS, which in turn has the potential to be used for non-presentational purposes (clearing floats is a classic example). In both cases it is the responsibility of the developer to make the separation 'clear enough' by writing good, maintainable code, and that onus on the developer will continue to be the case.
With regards to the second criticism I expect this will be sorted in time. It may be that Javascript becomes the dominant transport mechanism for content on the web, just as today no one would question the need for a browser to understand HTML. Even today there are growing numbers of examples of websites that serve almost all their content over AJAX (see Google Instant for details), which is a technology that relies on Javascript to 'decode' the information received from the web server into a form that a browser can understand.
In summary
Overall, jQuery, and its users and contributors, will be at the forefront of meeting the challenges posed by the next generations of websites and webapps. And, going by what they've done so far, they are well and truly equipped to meet them. At the end of the day, what this all means is a better user experience and fewer gray hairs for developers.

