Smartial Wayback Machine Text Extractor



Live version of this page exists.
However, it is different from the archived page (2 redirect/s found...)


This article contains 1485 words.

JavaScript, Ajax and the DOM | Web Directions

  • About the Survey
  • The Audience
  • Operating Systems and Browsers
  • Markup
  • CSS and Presentation
  • JavaScript and the DOM
  • Rich Media
  • Server tech­nolo­gies
  • The Cloud
  • Conclusions and predictions
  • Do they use JavaScript?
  • Libraries and Frameworks
  • JavaScript cod­ing practices

In the intro­duc­tion to this sec­tion of our report last year, we made the fol­low­ing obser­va­tions, which are only rein­forced by this year’s survey.

The resur­gence of the use of JavaScript, and the increased level of sophis­ti­ca­tion in its employ­ment on the web is noth­ing short of spec­tac­u­lar. After an early surge of enthu­si­asm in the mid to late 1990s, JavaScript remained largely con­fined to effects and gim­micks, until the rise of Ajax and var­i­ous libraries and frame­works. That the major­ity of our respon­dents con­sider them­selves “devel­op­ers” not “design­ers” is tes­ti­mony to how impor­tant JavaScript and Ajax have become.

In this sec­tion, we tried to get an under­stand­ing of the extent to which respon­dents used JavaScript (if at all), and how they used JavaScript.

Do they use JavaScript?

In response to the ques­tion “Do you use JavaScript in your devel­op­ment?”, only 4% (last sur­vey 5.3%) replied no. 77% (up from 73%) replied that they use it for visual effects, 66% (61%) for form val­i­da­tion, 48% (42%) for com­plex appli­ca­tion inter­ac­tion, and 58% (53%) for “Ajaxian com­mu­ni­ca­tion between client and server” (respon­dents could give mul­ti­ple answers).

Both the over­all per­cent­age of JavaScript users (96%), and the level of sophis­ti­ca­tion they are using the lan­guage for reflect not only the promi­nence of JavaScript as part of these respon­dents tools, but also the nature of web devel­op­ment gen­er­ally today.

Question 35: Do you use JavaScript in your development?

2010
AnswerCount%No563.99%For visual effects107776.82%For form validation92666.05%For com­plex appli­ca­tion interaction68348.72%For Ajax com­mu­ni­ca­tion with the server81858.35%
2008
AnswerCount%No655.27%For visual effects90273.10%For form validation75461.10%For com­plex appli­ca­tion interaction52042.14%For Ajax com­mu­ni­ca­tion with the server65953.40%
Libraries and Frameworks

The resur­gence of the use of JavaScript has gone hand in hand with the rise of robust, sophis­ti­cated JavaScript libraries like JQuery, Prototype and YUI. To get a sense of whether devel­op­ers are using these libraries, and which ones, we once again asked “Which JavaScript libraries and frame­works do you use?”, with options for a dozen of the most well known libraries, and the option too of list­ing other libraries used.

The big sto­ries here are

  • the small num­ber of respon­dents who use no library (down from 9.6% to only 3.9% in this sur­vey — effec­tively all our respon­dents use JavaScript, and all those who do use one or more libraries)
  • JQuery, already dom­i­nant last year with 63% of all respon­dents using it has increased strongly to a 78% adop­tion rate by respondents.
  • Of the other libraries, only YUI (11.5% from 10.8%), and Ext (2.8% up from 2.7%) saw an increase in per­cent­age use by respon­dents, Dojo stayed steady at 2.9%, and all oth­ers fell
  • Despite these changes, the rank­ing from most used to least used stayed essen­tially unchanged

Which JavaScript libraries and frame­works do you use?

2010
FrameworkCount%None553.92%Backbase10.07%Dojo412.92%Ext392.78%GWT130.93%JQuery109177.82%Mootools19613.98%Prototype24917.76%qoox­doo20.14%script​.aculo​.us18713.34%YUI16111.48%Other433.07%
2008
FrameworkCount%None1199.64%Backbase20.16%Dojo362.92%Ext332.67%GWT161.30%JQuery77562.80%Mootools23519.04%Prototype28723.26%qoox­doo10.08%script​.aculo​.us22418.15%YUI13310.78%Other504.05%

In addi­tion to choos­ing from a list of th emost com­mon libraries, we gave respon­dents the oppor­tu­nity to name other libraries they use. Interestingly, despite gain­ing con­sid­er­able cov­er­age in the last year or so, the fully fledged appli­ca­tion devel­op­ment focussed libraries Cappucino and Sproutcore each only were men­tioned once. These libraries are much more geared toward desktop-​​like appli­ca­tions in the browser than more “low level” libraries like most of those listed above. It remains to be seen whether in sub­se­quent sur­veys use of these libraries increases, or whether devel­op­ers aren’t par­tic­u­larly inter­ested in build­ing desktop-​​like appli­ca­tions for the web.

HTML 5

Since our 2008 sur­vey, HTML5 has gone from a promis­ing, atalked about tech­nol­ogy, to hav­ing quite wide sup­port of var­i­ous fea­tures in sev­eral con­tem­po­rary browsers. It’s par­tic­u­larly well adopted in the browsers on mobile devices like the iPhone, and Android. To get a sense of how much the API fea­tures, as opposed to markup fea­tures of HTML5 are being used, we asked a cou­ple of ques­tions regard­ing their use in this year’s sur­vey. Note to the pedants that we are aware that some of these APIs are not tech­ni­cally part of HTML5, and oth­ers have never been so, but we use HTML5 here as an umbrella term for new, browser based technologies.

Only fewer than 10% of our respon­dents say that they are work­ing with these APIs. However, given their still lim­ited sup­port, and their only recent avail­abil­ity, that they have sim­i­lar lev­els of adop­tion to SVG and Canvas is notable.

Of those APIs devel­op­ers men­tioned using, a lit­tle under a half (45%) use geolo­ca­tion APIs, around a third (31%) client side stor­age, while web work­ers, web­sock­ets, drag and drop and the file API all are men­tioned by a hand­ful of devel­op­ers at most.

Geolocation and client side stor­age are par­tic­u­larly rel­e­vant to mobile devices, so as we see mobile web use increase, and an increas­ing focus on opti­miz­ing for or tar­get­ting the mobile web user, we’d expect to see the use of those two tech­nolo­gies in par­tic­u­lar grow strongly.

Do you use HTML5 APIs (geolo­ca­tion, client side stor­age, web­work­ers etc)?

2010
AnswerCount%Yes1289.13%No112179.96%

If so, which APIs do you use

2010
APICount%geolo­ca­tion5745%client side storage4031%web work­ers43%drag and drop32.3%file api21.6%web­sock­ets21.6%
JavaScript cod­ing practices

Like last year, we also asked some ques­tions about devel­op­ers’ script­ing methodologies.

Do you sep­a­rate your JavaScript from your markup (“unob­tru­sive JavaScript”)?

Unlike the mes­sage of sep­a­rat­ing pre­sen­ta­tion from markup, devel­op­ers are some­what less likely to prac­tice “unob­tru­sive JavaScript”, with sim­i­lar num­bers this year when it came to that question.

2010
AnswerCount%Always61443.79%Usually52937.73%No563.99%
2008
AnswerCount%Always47738.65%Usually51841.98%No473.81%

Developers also con­tinue to adhere largely to the W3C DOM where pos­si­ble, but the real­i­ties of dif­fer­ent DOMs in dif­fer­ent browsers mean most respon­dents take a prag­matic approach to this issue.

Do you strictly adhere to the W3C DOM, and avoid browser spe­cific extensions?

2010
AnswerCount%Yes45432.38%As much as possible66447.36%No815.78%
2008
AnswerCount%Yes37530.39%As much as possible61349.68%No534.29%

Last year we were sur­prised at the extent to which respon­dents were using JavaScript and JavaScript libraries in their work.

While the per­cent­age of respon­dents using them trails that using HTML5 markup, there’s still an impres­sive takeup of at least some aspects of HTML5 APIs, given how recent and still evolv­ing these tech­nolo­gies are.

Next

Next we’ll take a look at how respon­dents use embed­ded con­tent like Flash, Silverlight, and other rich media for­mats which require often browser plug-​​ins.




Please close this window manually.