2015 年 JavaScript 開發者調查報告

你寫什麼類型的 JavaScript?npm

97.4% 的受訪者寫 JavaScript 的 Web 瀏覽器,其中有 37% 寫移動 Web 應用。vim

一些參與者回覆,他們會在其餘地方用 JavaScript,特別是在開發中的 CLI 和桌面應用。有少部分還會在 Pebble 和 Apple TV 上開發。這些歸類到其餘類別上,佔總選票的 2.2%。瀏覽器

An screenshot of the percentages for the first question

你在哪使用 JavaScript?服務器

不出我所料,94.9% 的投票者用 JavaScript 工做。然而,有 82.3% 的投票者也在其餘項目中使用 JavaScript。其餘回覆包括教學,好玩或者非盈利目的使用。網絡

An screenshot of the percentages for the second question

你寫 JavaScript 多久了?框架

超 過 33% 的人寫 JavaScript 代碼超過六年了。除去那些精準回答的選票,5.2% 在一年前開始寫 JavaScript,12.4% 兩年前開始寫 JavaScript,還有 15.1% 三年前寫 JavaScript。總共有 32.7% 的人在近幾年開始寫 JavaScript。編輯器

An screenshot of the percentages for the third question

你使用哪一種 complie-to-JavaScript 語言,若是有的話?工具

85% 參與者表示,他們將 ES6 編譯爲 ES5。同時有 15% 使用 CoffeeScript,有 15.2% 用 TypeScript,只有可憐的 1.1% 使用 Dart。單元測試

這是我想要進一步合做的問題之一,由於它有 13.8% 的「其餘」回覆。這個問題絕大多數的答案是 ClojureScript、elm、Flow 和 JSX。測試

An screenshot of the percentages for the fourth question

你喜歡哪一種 JavaScript 文體選擇?

JavaScript 開發者絕大多數彷佛青睞分號,總共有 79.9%。相比之下,11% 的人表示他們不喜歡使用分號。說到逗號,44.9% 的人同意放置後的表達,而 4.9% 的人喜歡用逗號第一語法。當涉及到縮進,65.5% 更喜歡空格,而 29.1% 的人更喜歡使用製表符。

An screenshot of the percentages for the fifth question

你使用 ES5 哪一個功能?

有 79.2% 的人使用 Array methods,而且有 76.3% 的人使用 strict mode。30% 的人使用 Object.create,而 getter 和 setters 只有 28% 的人使用。

An screenshot of the percentages for the sixth question

你使用 ES6 哪一個功能?

值得注意的是,Arrow functions 是本次調查中最經常使用的 ES6 特色,佔了總票數的 79.6。Let and const 
總共佔 77.8% 的投票,Promise 功能依舊強勁,有 74.4 %的人選擇了它。不出人意料的是,只有 4% 的人使用 proxies。只有 13.1% 的人用 Symbols,超過 30% 的人使用 Iterators。

https://i.imgur.com/okcvuos.png

你寫測試嗎?

有 21.7%  的人來不寫任何測試,大多數人寫一些測試,34.8% 常常寫測試。

An screenshot of the percentages for the eighth question

你運行連續集成測試嗎?

和 CI 同樣,不少人不用 CI 服務器 —— 超過了 40%。有 60% 的人偶爾使用 CI,有 32% 的人在 CI 服務器上運行測試。

An screenshot of the percentages for the ninth question

你怎麼運行測試

59% 的人喜歡運行和 PhantomJS 類似的自動化瀏覽器測試,51.3% 的人也喜歡在網絡瀏覽器上人工測試。自動化服務器端測試則佔了 53.3% 的得票。

An screenshot of the percentages for the tenth question

你用什麼單元測試庫?

大多數人要麼選擇 Mocha 要麼選擇 Jasmine 運行 JavaScript 測試,Tape 收到 9.8% 選票。

An screenshot of the percentages for the eleventh question

你用什麼代碼質量工具?

彷佛參與者都在 ESLint 和 JSHint 之間糾結,不過 JSLint 通過了這麼多年依舊堅挺,幾乎有 30%。

An screenshot of the percentages for the 12th question

你怎麼處理客戶端的依賴?

Npm 接管客戶端依賴管理體系,擁有 60% 的選票。Bower 依舊佔據了 20% 的選票,而普通的 <script> 下載和插入得到13.7% 的選票。

An screenshot of the percentages for the 13th question

你首選的構建腳本解決方案是什麼?

Gulp 最流行,超過 40% 的投票。接下來的是 NPM,爲 27.8%, Grunt 得到了 18.5% 的選票。

An screenshot of the percentages for the 14th question

你首選的 JavaScript 加載工具時什麼?

大多數參與者在 Browserify 和 Webpack 之間徘徊,然後者領先前者 7 個百分點。

An screenshot of the percentages for the 15th question

你用什麼庫?

jQuery 依舊強勁,佔據票數 50% 以上,而 XHR 微庫只有票數的 8%。

An screenshot of the percentages for the 16th question

你用什麼框架?

不出人意料,React 和 Angular 處於領先地位。Backbone 也在靠前的位置,有 22.8% 的選票。

An screenshot of the percentages for the 17th question

你用 ES6 嗎。。。

有 20% 的人幾乎從不使用它,有 40% 的人偶爾使用,接近 30% 的人普遍使用。

An screenshot of the percentages for the 18th question

你知道 ES2016 有哪些特性嗎?

粗略地說,有一半的人不知道 ES2016  有哪些新特性。

An screenshot of the percentages for the 19th question

你理解 ES6 嗎?

超過 60% 的人理解基本的概念,有 10% 的人徹底不理解,有 25% 的人理解 ES6。

An screenshot of the percentages for the 20th question

你會說 ES6  是一種進步嗎?

近 95% 的人認爲 ES6 是一種進步。

An screenshot of the percentages for the 21th question

你首選文本編輯器是什麼?

超過一半的人喜歡 Sublime Text,超過 30% 喜歡 Atom 和它的開源複製版。超過 25%  WebStorm  和 vi/vim。

An screenshot of the percentages for the 22th question

你首選的開發系統是什麼?

超過 60% 的人用的是 Mac,而 Linux 和 Windows 用戶接近 20%。

An screenshot of the percentages for the 23th question

你如何找到可重用代碼,庫和工具?

受訪者彷佛同意使用 Github 和搜索引擎,也有用博客、Twitter 和 npm  網站。

An screenshot of the percentages for the 24th question

你參與 JavaScript 社交事件嗎?

近 60% 的人至少參加一個會議,而 74% 的人表示,他們喜歡去的聚會。

An screenshot of the percentages for the 25th question

你的 JavaScript 應用程序裏支持什麼瀏覽器?

不少樣的答案,但幸運的是大多數的受訪者沒有使用 IE6 了

An screenshot of the percentages for the 26th question

你瞭解 JavaScript 的按期最新的功能嗎?

當 JavaScript 有更新時,80% 受訪者保持會去了解。

An screenshot of the percentages for the 27th question

你在哪裏瞭解最新的 JavaScript 功能?

Mozilla 開發者網絡在 JavaScript 領域和新聞更新上處於領先地位。JavaScript 週刊也很是流行,佔了 40%。

An screenshot of the percentages for the 28th question

這些功能你據說過嗎?

超過 85% 的選民據說過 ServiceWorker,我很好奇有多少人用它!

An screenshot of the percentages for the 29th question

除了 JavaScript,你還用什麼語言?

有這麼多的語言可供選擇,我確定會忘了一些,但結果不言自明。

An screenshot of the percentages for the 30th question

相關文章
相關標籤/搜索