回顾2017年JavaScript状况

by Sacha Greif

由Sacha Greif

回顾2017年JavaScript状况 (A Look Back at the State of JavaScript in 2017)

在2017年JS状况调查结果之前,我们的专家小组回顾了过去的一年 (In advance of the 2017 State of JS survey results, our panel of experts looks back on the past year)

One of the highlights of last year’s State of JavaScript survey results was the great panel of experts we assembled to analyze the results.

去年JavaScript状态调查结果的亮点之一是我们聚集的专家小组来分析结果。

This year, we took a slightly different approach and decided to let the data speak for itself.

今年,我们采用了略有不同的方法,并决定让数据说明一切。

But I still wanted to know what our previous panelists (along with two new special guests) had been up to for the past 12 months, so I got in touch to ask them a few questions about their year in JavaScript.

但是我仍然想知道我们过去的小组成员(以及两名新的特别嘉宾)在过去的12个月中的表现如何,所以我联系了他们,向他们询问有关他们JavaScript生涯的一些问题。

会见小组成员 (Meet the Panelists)

回顾您去年写的内容,您对自那时以来该特定领域的演变有何看法? (Looking back at what you wrote last year, what are your thoughts on how that specific domain has evolved since?)

迈克尔·希尔曼 (Michael Shilman)

Among the survey choices from last year, Jest has exploded and has surpassed Jasmine in NPM downloads.

在去年的调查选择中,Jest的NPM下载量激增并超过了Jasmine。

Jest supports snapshot testing, I’ve seen lots of people using snapshotting as a cheaper alternative to unit tests for basic input/output behavior. This is especially popular in the UI space, with Storyshots, as well a whole ecosystem of related tools such as Loki, Percy, Screener, and Chromatic.

Jest支持快照测试,我已经看到很多人使用快照作为基本输入/输出行为的单元测试的廉价替代方案。 这在UI空间中特别受欢迎,包括Storyshots以及相关工具的整个生态系统,例如LokiPercyScreenerChromatic

黄珍妮 (Jennifer Wong)

Last year’s survey has definitely predicted some of the trends of 2017. With the continued popularity of all things shiny and new, it’s no wonder Webpack’s still going strong. Yarn wasn’t even part of the survey last year, but has been picking up steam since its first full release in September. I’m curious to see what happens as Yarn and npm fight it out.

去年的调查肯定预测了2017年的一些趋势。随着所有事物的不断流行和新事物的流行,难怪Webpack仍然会变得强大。 去年,Yarn甚至没有参与调查,但自9月首次全面发布以来,它一直在加速发展。 我很好奇看到Yarn和npm争夺战时会发生什么。

汤姆·科尔曼 (Tom Coleman)

I’m not sure a real competitor to Redux has emerged, but perhaps in the community there has been a movement to what the creator Dan Abramov has always said: “not every app needs Redux, and in many cases it brings more complexity than it solves”.

我不确定Redux的真正竞争对手已经出现,但是在社区中,创造者Dan Abramov一直在说:“并非每个应用都需要Redux,而且在很多情况下,它带来的复杂性超过了它。解决”。

With the increasing usage of server data management tools, especially for GraphQL data (see Apollo and Relay Modern), the need for complex client-side data tools has probably lessened somewhat. It’ll be interesting to see how the movements of those tools towards supporting local data also plays out.

随着服务器数据管理工具(尤其是GraphQL数据)的使用不断增加(请参阅Apollo和Relay Modern),对复杂的客户端数据工具的需求可能有所减少。 有趣的是,这些工具朝着支持本地数据的运动也将如何发挥作用。

什么很棒的新JavaScript工具/库/框架/等。 你在2017年用过吗? (What cool new JavaScript tools/libraries/frameworks/etc. have you used in 2017?)

迈克尔·希尔曼 (Michael Shilman)

My biggest testing discovery of 2017 was Cypress as a very convenient OSS/commercial option for end-to-end testing, though I find it to be still rough around the edges.

我在2017年最大的测试发现是赛普拉斯(Cypress)作为端到端测试的非常方便的OSS /商业选项,尽管我发现它仍然有些粗糙。

Also, I’m maintaining Storybook, which is the most popular UI development tool for React, React Native, and Vue.

另外,我正在维护Storybook ,这是React,React Native和Vue最受欢迎的UI开发工具。

黄珍妮 (Jennifer Wong)

We’re in the process of transitioning much of our frontend code at work to React, Redux, Webpack, and Yarn. It’s been an interesting and complicated transition, but many hands have made lighter work. This was in part prompted by the creation of a shared design system and component library.

我们正在将许多工作中的前端代码过渡到React,Redux,Webpack和Yarn。 这是一个有趣且复杂的过渡,但是许多人的工作变得轻而易举。 创建共享设计系统和组件库在一定程度上促使了这一点。

汤姆·科尔曼 (Tom Coleman)

Prettier! I can’t write code anymore I am so reliant on this tool. I’ve used Jest a lot more and have been really happy with it. I’ve really gotten into Storybook and have made more and more use of it (and started helping maintain it!)

更漂亮 ! 我不能再写代码了,我太依赖这个工具了。 我已经更多地使用了Jest ,并且对此感到非常满意。 我真的很喜欢Storybook ,并且越来越多地使用它(并开始帮助维护它!)

Otherwise I’ve been heads down developing Chromatic a visual regression testing tool for Storybook. Really exciting to see some companies start finally getting their front end tested properly (ourselves included!)

否则,我将一直致力于开发适用于Storybook的视觉回归测试工具Chromatic 。 看到一些公司开始对前端进行正确的测试(包括我们自己!),真是令人兴奋。

迈克尔·兰博(Michael Rambeau) (Michael Rambeau)

The favorite tool I found in 2017 was Prettier. It makes me save a lot of time when I write code, since I don’t worry about “styling” my code anymore.

我在2017年发现的最喜欢的工具是Prettier 。 因为我不再担心代码的“样式”,这使我节省了很多时间来编写代码。

I don’t care about tabs or semi-columns anymore… Just Ctrl S in the IDE and everything is well formatted! Moreover, it reduces friction with other teams members when working on the same code base.

我不再在乎制表符或半列了……在IDE中只需按Ctrl S即可,所有内容格式正确! 而且,它减少了在相同代码库上工作时与其他团队成员的摩擦。

韦斯·博斯 (Wes Bos)

All kinds of stuff! date-fns has replaced my moment.js usage. Next.js has been big for me for building server rendered React apps. Been also learning Apollo for working with GraphQL.

各种各样的东西! date- fns取代了我的moment.js用法。 Next.js对于构建服务器渲染的React应用程序非常重要。 还学习了与GraphQL一起使用的Apollo。

拉斐尔·贝尼特(RaphaëlBenitte) (Raphaël Benitte)

Working both on several open-source projects and at work, it’s really important to be able to improve automation. Using Prettier, ESLint, Jest, Validate-commit-msg with Lint-staged really helped in that.

无论是在多个开源项目上还是在工作中,提高自动化水平都非常重要。 通过使用Prettier,ESLint,Jest, Lint阶段的 Validate-commit-msg确实起到帮助。

I also built Nivo, a data visualization library for React.

我还构建了Nivo ,这是React的数据可视化库。

Finally, with the rise of Async/Await and its now native support in Node.js I have also tried Koa. While its ecosystem is narrower than Express, I found it easy to get started with, and if you’re familiar with Express you won’t be lost.

最后,随着Async / Await的兴起及其对Node.js的原生支持,我也尝试了Koa 。 虽然它的生态系统比Express窄,但我发现它很容易上手,如果您熟悉Express,就不会迷路。

如果今天有人想从头开始学习JavaScript,那么您会推荐他们重点关注哪三种技术? (If someone wanted to learn JavaScript from scratch today, which 3 technologies would you recommend they focus on?)

迈克尔·希尔曼 (Michael Shilman)
  • React for UI.

    对UI做出React。
  • Webpack for build.

    用于构建的Webpack。
  • Apollo for networking.

    阿波罗网络。
黄珍妮 (Jennifer Wong)

Any framework, any build tool, and Node. Many of the concepts translate between frameworks and build tools, so hopefully learning one well can help map to others. If I had to choose one of each, perhaps React and Webpack because they’re trending — and trending technologies present well to people in the industry.

任何框架,任何构建工具和节点。 许多概念在框架和构建工具之间转换,因此希望学习一口井可以帮助映射到其他井。 如果我必须选择其中之一,也许是React和Webpack,因为它们正在发展—趋势技术很好地为行业中的人们所用。

汤姆·科尔曼 (Tom Coleman)

Certainly React, although the other frontends are interesting, the mindshare of React is getting pretty huge these days. A must have.

当然,React,尽管其他前端很有趣,但近来React的心态正在变得越来越庞大。 一个必须有。

GraphQL, I think most experienced front-end devs recognize that the problems it solves are pretty universal, and it’s a pleasure to work with.

GraphQL,我认为大多数有经验的前端开发人员都认识到它解决的问题相当普遍,并且很高兴与之合作。

Storybook, I think building from components their states up is the future of app development, and Storybook is the leading tool to do this with.

故事书,我认为从组件的状态开始构建是应用程序开发的未来,而故事书是实现此目的的领先工具。

迈克尔·兰博(Michael Rambeau) (Michael Rambeau)
  • React, as the front-end layer

    React,作为前端层
  • Express, as the back-end server

    Express,作为后端服务器
  • Jest, as the testing solution for both front-end and back-end code.

    开玩笑,作为前端和后端代码的测试解决方案。
韦斯·博斯 (Wes Bos)

If you are just learning, you need to have small wins to keep you excited about the language. So, I’d say along with the fundamentals, learn the DOM API, Learn Async + Await, and learn a new visual API like web animations.

如果您只是在学习,则需要取得一些小的胜利,以使您对语言感到兴奋。 因此,我会说一些基础知识,学习DOM API,学习Async + Await,并学习新的可视化API,例如网络动画。

拉斐尔·贝尼特(RaphaëlBenitte) (Raphaël Benitte)
  • If you’re really new to JavaScript, start with the basics — and ES6, which is now part of the basics.

    如果您真的不熟悉JavaScript,请从基础知识开始-ES6,现在已成为基础知识的一部分。
  • Obviously, React for building UIs

    显然,React用于构建UI
  • GraphQL, which is becoming mature and is now used by big companies Facebook, GitHub, Twitter and many more

    GraphQL ,这是越来越成熟,现在所使用的大公司的Facebook,GitHub上,Twitter和更多 ...

您今天最大JavaScript难点是什么? (What’s your biggest JavaScript pain point today?)

迈克尔·希尔曼 (Michael Shilman)

Hoping a best practice and library-of-choice emerges for CSS-in-JS. While there are lots of good choices, it still feels fragmented, and a lot of the world is still doing CSS-in-CSS, so lots of confusion unless that’s your focus.

希望有最佳实践和CSS-in-JS选择库。 尽管有很多不错的选择,但它仍然感觉支离破碎,并且世界上许多国家仍在使用CSS-in-CSS,因此除非您关注焦点,否则很多困惑。

黄珍妮 (Jennifer Wong)

The constant changes. By the time I learn one new technology, we’re onto the next. Also, stop stealing my CSS, JavaScript!

不断变化。 当我学习一项新技术时,我们就开始学习下一项。 另外,不要再偷我CSS,JavaScript了!

汤姆·科尔曼 (Tom Coleman)

Webpack. Extraordinarily powerful tool that lies way too far over on the “configuration over convention” spectrum.

Webpack。 极为强大的工具,在“常规配置之上”的范围上远远超出了。

It’s very hard to avoid having to learn its intricacies to work on JS apps, but often times they are details you shouldn’t really need to care about. I’m still hoping that Meteor can regain the throne as the best way to build a modern JS app.

很难避免必须学习其复杂性才能在JS应用程序上工作,但是通常它们是您真正不需要关心的细节。 我仍然希望Meteor可以重新获得王位,这是构建现代JS应用程序的最佳方法。

迈克尔·兰博(Michael Rambeau) (Michael Rambeau)

The lack of standard, the fact that you have a lot of things to consider when you pick your stack before starting a new project. But things are improving!

缺乏标准,在开始新项目之前选择堆栈时,您需要考虑很多事情。 但是情况正在改善!

韦斯·博斯 (Wes Bos)

checking && checking.for && checking.for.nested && checking.for.nested.properties. I know there are utility functions out there to do this, but it looks like we might get this in the language soon.

checking && checking.for && checking.for.nested && checking.for.nested.propertieschecking && checking.for && checking.for.nested && checking.for.nested.properties 。 我知道那里有实用程序函数可以执行此操作,但是看来我们可能很快会用该语言获得它。

拉斐尔·贝尼特(RaphaëlBenitte) (Raphaël Benitte)

There are too many tools… It’s difficult to pick the right one, and we must be really careful about trends as they can move really fast in the JS ecosystem.

工具太多了……很难选择合适的工具,我们必须对趋势保持谨慎,因为它们可以在JS生态系统中快速移动。

您在JavaScript生态系统中最期待2018年的什么? (What are you most looking forward to in 2018 in the JavaScript ecosystem?)

迈克尔·希尔曼 (Michael Shilman)

Wishlist (no idea whether any of these will happen in 2018):

愿望清单(不知道其中是否会在2018年发生):

  • GraphQL reaches Meteor’s level of convenience for data sync.

    GraphQL达到了Meteor的数据同步便利性水平。
  • Universal (web/mobile) stabilizes and takes off for React Native.

    通用(网络/移动)稳定下来并开始使用React Native。
  • Cypress or a competitor emerges for end-to-end testing.

    赛普拉斯或竞争对手出现了端到端测试。
黄珍妮 (Jennifer Wong)

Stabilization. I’m crossing my fingers that the JavaScript “stack” and community will begin to settle down a bit, and we’ll get into a groove that causes less churn.

稳定。 我指责的是,JavaScript“堆栈”和社区将开始稳定下来,我们将陷入困境,从而减少流失。

汤姆·科尔曼 (Tom Coleman)

The end of Babel! I love Babel but with Node 8 I pretty much don’t need babel any more. It’s great to be working so close to the interpreter again.

巴别塔的尽头! 我喜欢Babel,但是有了Node 8,我几乎不再需要Babel。 再次与口译人员如此亲密的工作真是太好了。

Obviously the ES standards will keep moving forward but with modules and async/await a lot of the more frustrating corners of JS have been ironed out and many projects will probably be fine with the JS version shipped with node and all modern browsers pretty soon!

显然,ES标准将继续向前发展,但是随着模块和异步/等待的到来,JS的许多令人沮丧的角落都已消除,许多项目可能很快就会与node和所有现代浏览器一起提供的JS版本一起使用!

迈克尔·兰博(Michael Rambeau) (Michael Rambeau)

I’m curious to see how GraphQL will grow. Will it become the new standard when releasing an API?

我很好奇GraphQL将如何发展。 发布API时会成为新标准吗?

韦斯·博斯 (Wes Bos)

Now that Node stable and all the browsers have Async+Await, I’m looking forward to native promises becoming common place in frameworks, utility libraries and the code that you write day to day.

现在,Node稳定并且所有浏览器都具有Async + Await,我期待原生承诺在框架,实用程序库和您每天编写的代码中变得常见。

拉斐尔·贝尼特(RaphaëlBenitte) (Raphaël Benitte)

Most languages have a dedicated/preferred build tool (eg. Maven for Java). Although we do have a lot of options when it comes to JavaScript, those solutions are too often dedicated to the front-end. I’d like to see npm (or Yarn) add support for basic features such as documentation, autocompletion, script dependencies, etc. Otherwise I’ll probably keep using GNU Make.

大多数语言都有专用/首选的构建工具(例如Maven for Java)。 尽管我们在JavaScript方面确实有很多选择,但是这些解决方案通常专用于前端。 我希望npm(或Yarn)添加对基本功能(如文档,自动完成,脚本依赖项等)的支持。否则,我可能会继续使用GNU Make。

And this one is quite controversial, but we’ve seen that people are really interested in solutions like TypeScript (or Flow). Node.js and browsers have made a clear effort to move faster, but if you want static typing you’ll still have to add another transpilation phase for it. So how about native statically typed Javascript? You can find a discussion on the subject here.

这个问题颇具争议,但是我们已经看到人们对诸如TypeScript (或Flow )之类的解决方案非常感兴趣。 Node.js和浏览器已经为加快速度做出了明显的努力,但是如果您要进行静态键入,则仍然必须为其添加另一个转换阶段。 那么本地静态类型的Javascript呢? 您可以在此处找到有关该主题的讨论。

结论 (Conclusion)

It seems like our panel agrees on at least a few things: React is a safe bet, Prettier is a great tool, and yes, the JavaScript ecosystem is still too complex…

似乎我们的小组在至少几件事上达成了共识:React是一个安全的选择,Prettier是一个很好的工具,是的,JavaScript生态系统仍然太复杂了……

Which is exactly what we were trying to address in the first place when we did that survey!

这正是我们进行调查时首先要解决的问题!

We’ll be launching our results site very soon. One week from now in fact, on December 12.

我们将很快启动结果网站。 实际上,从现在开始的一个星期就是12月12日。

We’ll hold a launch livestream + Q&A so you can ask us all the questions you want - or just hang out! And who knows, we might even have special guests drop in… ;)

我们将举行启动直播+问答环节,以便您可以向我们提出所有想要的问题-或只是出去玩! 谁知道呢,我们甚至可能会有特别的客人来……;)

If you want to know when the results are live and get a notification for the hangout, you can leave us your email and we’ll let you know.

如果您想知道结果何时发布并收到视频群聊的通知,可以给我们留下您的电子邮件 ,我们会通知您。

翻译自: https://www.freecodecamp.org/news/a-look-back-at-the-state-of-javascript-in-2017-a5b7f562e977/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值