科技和互联网

2万3千开发者眼中的JavaScript

到2017年底为止,我们可以肯定地说,历史上从来没有一种语言可以拥有JavaScript一样的流行程度。JavaScript羽翼丰满,不再只是一种简单的描述语言,它可以成为开发者想要的所有的一切。

前端的框架中React占据了最高地,但是Angular和Vue也是另辟蹊径,前者拥有众多的企业应用库,后者渐渐成为完整的前端框架,在中国的开发者眼中有绝对的优势。2018年,必须要去探索的是GraphQL,下一代的查询语言,虽然现在用户尚不多。JavaScript不再只是前端的瑞士军刀,Node.js的兴盛让所有开发者对JavaScript的潜力有了无限的憧憬。

文章结束前介绍的JavaScript学习资源非常值得一看,也许其中之一会成为你开启宝藏大门的钥匙。

原文链接:https://medium.freecodecamp.org/

抄录:

I just asked 23,000 developers what they think of JavaScript. Here’s what I learned.

Sacha Greif

I recently published our results for the 2017 edition of the annual State of JavaScript survey, collected from over 23,000 developers.

The results revealed many things, from popularity trends to salary breakdowns. You’ll want to take a look for yourself if you haven’t done so already. But among all these data, here are the 10 things that stood out most to me.

Even if you’ve already seen the results, you might want to check out the new Features and Opinions sections we’ve just added.

Insight #1: React is here to stay
This year’s edition confirmed last year’s trend: React is currently the dominant front-end library.

React has the most happy users (dark purple bar) by far
React’s early criticisms (usually centered around the way it mixes HTML and JS) now seem like a distant memory, and Facebook put to rest developers’ last major hangup this year by getting rid of their license’s patent clause.

With both usage numbers and developer satisfaction at an all-time high, it’s safe to say React is sitting at the top of the hill, at least for the time being.

Insight #2: Angular is shifting to a new role
This doesn’t mean you should count Angular out just yet. While it’s true it doesn’t have the same momentum as React, it does have a few very strong factor going for it.

First, Angular has Google’s might behind it. Say what you want, that’s some of the best engineers in the industry working full-time to improve the framework.

It’s also important to point out that Angular still has a huge user base. Banks, governments, and other large companies can’t adopt the latest hotness as fast as your average freelancer, and for that reason they often have large legacy Angular codebases to maintain.

“new” Angular (2+) vs “old” Angular (AngularJS): smaller adoption, but much higher developer satisfaction
But the final point is probably the most key: Angular is not trying to fight React head-to-head anymore, instead refocusing itself on the enterprise market. Just look at Angular’s adoption of TypeScript: while it may have put off some developers, that decision also brought the kind of reliability and security needed for enterprise apps.

Insight #3: You can’t ignore Vue.js anymore
Vue came out from seemingly nowhere last year, and in a very short time it has established itself as the biggest threat to React’s crown. It might not have Angular’s raw numbers or Ember’s longevity, but it has something that beats both: momentum.

Vue & React: the two highest developer satisfaction ratios (light purple vs dark purple)
And while Vue beating out React still seems like a long shot, Vue does arguably have a better story when it comes to offering a full framework-like experience, thanks to official routing and state management libraries maintained by the same core team.

Insight #4: Knowledge of some libraries will help you earn more (but not for the reasons you might think)
By collecting and cross-referencing salary data, we were able to find out which technologies are the most lucrative.

JavaScript flavors, from lowest-paying (left) to highest-paying (right)
And as it turns out, it’s often niche technologies like Polymer or Reason that correlate with the highest salaries.

JavaScript front-end libraries, from lowest-paying (left) to highest-paying (right)
Now before you quit your current job and spend your Christmas holidays neck-deep in Polymer videos, remember that correlation does not equal causation.

While it’s possible that Polymer developers are paid more, it’s also possible that more senior devs (who naturally earn more) tend to try a more diverse range of libraries, while junior programmers (who start at the bottom of the salary ladder) prefer to focus on one or two mainstream technologies instead.

So maybe (just maybe) running after the latest flavor of the day is not the key to earning the big bucks after all.

Insight #4: 2018 will be the year of GraphQL
If you’re like the majority of survey respondents, you’ve heard about GraphQL and you’re intrigued, but you’ve yet to actually try it (hint: I wrote this article just for you!).

REST wishes it had a logo this cool
As it turns out, this is a very common situation. Out of all the technologies mentioned in the survey, GraphQL is the one generating the most interest — despite its small number of current users.

That big yellow bar represents 14k GraphQL-curious developers
And speaking of current users, it’s also worth mentioning that they are overall highly satisfied with GraphQL. With this combination of high interest and high satisfaction, don’t be surprised if 2018 is the year that GraphQL finally crosses the chasm into becoming a mainstream technology.

Insight #6: JavaScript != Front-end
We’ve known for a while that JavaScript isn’t just used in the browser. After all, Node has been a very popular back-end choice for a number of years now.

But in 2017, JavaScript is expanding even further: platforms like AWS Lambda let you write back-end code without a back-end, while the growing popularity of IoT-enabled devices means that before long, your toaster might very well end up running JavaScript too.

This toaster uses the heat generated by running Slack’s desktop app to toast your bread
If that sounds absurd, remember that this year’s most popular text editor, VS Code, is itself written in JavaScript and runs as an Electron app.

JavaScript went from being a tool to display banner ads to powering text editors, all in the span of a couple years. Believe me, the JavaScript toasters might come along sooner than you think.

Insight #7: Microsoft is striking back
Speaking of VS Code, it was definitely one of this year’s big surprises. While Sublime Text and Atom were battling it out for text editor supremacy, newcomer VS Code came in through the window and stole their lunch.

Sublime Text has traditionally had the speed advantage but has been weight down by an unintuitive UI, while Atom has a great UI but can often feels sluggish.

VS Code
Turns out VS Code might’ve found the right balance. Although it’s built on top of Electron like Atom, Microsoft’s engineer have done a great job improving its performance. And just like Sublime, it supports a vast range of plugins and customizations, albeit in a more user-friendly “it just works” package.

Add to this the rise of TypeScript (more on this later) and it looks like Microsoft is finally getting its web game together and showing that it can make things developers use because they actually want to, not just because they have to.

Insight #8: JavaScript is different around the world
When we talk about JavaScript, we often tend to talk about it as a single, unified ecosystem. While it’s true that there are major trends that hold true across regions, it’s also interesting to see that each country will often add its own blend of spices to the JavaScript melting pot.

For example, did you know that Vue is extremely popular in China? It makes sense, since Vue’s creator Evan You speaks the language, and Vue has been adopted by multiple major Chinese tech companies such as Alibaba and Baidu.

India on the other hand seems to prefer Angular. This is probably driven at least in part by India’s dynamic outsourcing industry, which often goes after the kind of large enterprise projects Angular is perfect for.

Insight #9: Typed JavaScript is on the rise
TypeScript. GraphQL. Elm. Reason. What do these all have in common? First, they’re all cutting-edge technologies that are seeing rapid growth. Second, they all rely on types.

It’s got “type” right there in the name. A bit too on the nose if you ask me…
While JavaScript developers have long enjoyed the freedom that comes with being able to code however you want without a compiler yelling at you, this freedom can be a double-edged sword: it also means a less reliable, more buggy developer experience.

In 2017 though, things are finally changing. And it’s not a coincidence that just as TypeScript is being adopted more widely, developers are also migrating towards IDE-like text editors such as VS Code to take better advantage of the extra features provided by types.

Insight #10: JavaScript is whatever you want it to be
Once more, this survey showed just how rich the JavaScript ecosystem has become.

It seems like after years of alternating between fighting and ignoring JavaScript, the developer community has finally hit on a third option: improving it.

The realization that “JavaScript” is basically whatever you make of it has opened the doors to the language morphing and adapting to fill almost any need, and that trend shows little sign of stopping.

And that’s probably why most developers agree that despite its flaws, the language is moving in the right direction overall:

What’s Next
We’re still working on analyzing and publishing some of our extra data. If you want to know when that comes out (or if you want to know when we open the 2018 edition of the survey) you can leave us your email

Learn Stuff & Support State Of JS!
Finally, if you’d like to support the project and learn all about these cool new technologies at the same time, we recommend checking out these affiliate links to Wes Bos’ courses. He’s one of the best teachers around, puts a ton of effort into his videos, and I’ve personally used his material to learn React.

ES6 for Everyone
A premium training course to strengthen your core JavaScript skills and master all that ES6 has to offer. 21 Modules…es6.io
React For Beginners
Want to upgrade your JavaScript skills and learn React.js? Learn how to build websites and web apps in just a couple of…reactforbeginners.com
Learn Node
A premium training course to learn to build apps with Node.js, Express, MongoDB, and friends.learnnode.com
Viewed using Just Read

Report an error

XPrintEdit styles

Tagged

我忍不住要留言