Abstract: It’s been an interesting year for JSer.

This article is inspired by JavaScript Weekly and you are welcome to subscribe.

The State of JavaScript 2018

The State of JavaScript research has been conducted for three consecutive years (2016, 2017, 2018), and this year has surveyed more than 20,000 JS developers. Here are some interesting findings:

  • Most developers have used ES6, and TypeScript is becoming increasingly popular;
  • React remains the most popular front-end framework, while Vue is gaining popularity;
  • Express is still the most popular Node.js framework (Node 8 already supports async functions, so Koa should be much less valuable);
  • Visual Studio Code has far surpassed Sublime as the most popular JS editor;

As a backend Express framework, use the latest ECMAScript syntax as much as possible while the front end uses TypeScript, but the framework remains AngularJS 1(fault Angular for not being backward compatible), and Sublime, which costs $70, is deprecated. JSer joining VS Code this year, I’m mainstream enough. What about you?

ECMAScript 2018

TC39(ECMAScript Standards Committee) has been getting more and more active over the years, publishing a new ECMAScipt standard every year since 2015 (ES6). This year the bigwigs continue to be busy with proposals. ECMAScript 2018, or ES9, was released on schedule in June, with few new features:

Key new features:

  • Asynchronous Iteration
  • Rest/Spread Properties

New regular expression features:

  • RegExp named capture groups
  • RegExp Unicode Property Escapes
  • RegExp Lookbehind Assertions
  • s (dotAll) flag for regular expressions

Other new features:

  • Promise.prototype.finally()
  • Template Literal Revision

For more details on ES9, explore ES2018 and ES2019 by Dr Axel Rauschmayer.

Node 10

Node 10 was released in April and became LTS, or long term support, in October.

Node 10 is powered by the new V8 engine 6.8, resulting in significant performance improvements, such as Promise and Async functions, which are recommended for upgrading.

Release dates for New Versions of Node have been very consistent, which is not always easy.

Vue 3.0

At the Vue.js Conference Toronto 2018, You delivered the keynote Vue 3.0 Updates, which will have these changes:

  • faster
  • smaller
  • Easier to maintain
  • More native support
  • Drop Flow and use TypeScript

Vue 3.0 is expected to be released in 2019.

Babel 7

Over two years and 4000 commits later, Babel 7 is finally released with the following new features:

  • Babel-upgrade: a tool to upgrade Babel;
  • Babel.config. js: learn ESLint and Webpack, use JS file configuration;
  • Overrides to allow the same project to use different Babel configurations, for example targets for Chrome 60 and Targets for Node 8 for back-end code.

The new ECMAScript features are well supported by mainstream browsers, but there are still and always will be plenty of non-mainstream browsers, so we can’t live without Babel.

JQuery 3.3.0

The once popular jQuery released 3.3.0, which deprecated a series of methods:

  • jQuery.now
  • jQuery.isWindow
  • jQuery.camelCase
  • jQuery.proxy
  • jQuery.type
  • jQuery.isNumeric
  • jQuery.isFunction
  • Event aliases

Most of these methods will be removed in jQuery 4.0, so jQuery officially encourages you to use alternative methods.

This update also shows that the era of jQuery is coming to an end, and the geeks at GitHub have abandoned jQuery altogether.

10 years of V8 engine

The powerful V8 engine has been released for 10 years, and its name is inspired by the V8 engine of the Super Performance car, and it certainly lives up to its name! Its performance has been steadily improving:

V8 was originally developed for Chrome, but has since become a separate project. Many domestic browsers, including Sogou, 360, Cheetah, QQ, Baidu, UC are based on Chromium browser development, and Chromium is equivalent to the open source version of Chrome, naturally based on V8 engine. As a result, many “domestic” browsers are actually based on V8. Red Core browser financing 250 million yuan is no exception, they simply packaged Chrome browser installation package, sure enough rich capricious! What’s more, even Microsoft, the oddity of the browser world, has jumped on board.

In addition, Node.js is based on the V8 engine.

NPM moduleevent-streamGet hacked

It’s a lot of hype, but it’s a lot of gimmicks, and if you really look at what the hackers did, the real impact is not that big, at least the Vue developers have nothing to worry about:

  • The Bitcoin wallet Copay relies on the Event-Stream module;
  • The hacker defrauded the EVENT-stream module of NPM publishing permission.
  • The hacker added a dependency on flatmap-stream to the event-stream module;
  • Flatmap-stream contains hacker code that will only be executed correctly in the Copay project to steal users’ passwords, private keys, and other information, thus stealing Bitcoin;
  • Some people say that Vue may be attacked, but there is no such thing as hacking code that only executes correctly in copay projects. Only the description string “A Secure Bitcoin Wallet” in the copay project’s package.json can decrypt the hacker code; Moreover, the hacker’s code was tailor-made for Copay and had no effect on other projects; Besides, hackers are here to steal bitcoins, not mine them. Do you have any bitcoins to steal from your project?

Students, don’t be fooled by the clickbait!

Refactoring version 2 moved to JavaScript

Refactoring: Improving the Design of Existing Code is a book most people haven’t seen, but at least they’ve heard of. The book is just out in its second edition, and all the sample code has been changed from Java to JavaScript.

According to author Martin Fowler, ** Refactoring focuses on ideas and can be applied to any programming language, so it doesn’t matter what language you choose. ** He chose JavaScript simply because IT supports both procedural and object-oriented programming, making it easy to write examples of non-OOP code refactoring.

Here’s a quote from Rain Creek:

As for refactoring and design, I just want to say that it depends on the level of the user, not the language. Bad people write shit code with TS, just look at Java.

The language in which Refactoring’s example code was written is not as important as the programming thought behind it. Clean Code, by the way.

At $54.66, it’s a bit pricey, but it’s a must-read.

Dead simple to abandon the jQuery

JavaScript is the most popular programming language on GitHub, making it the largest social platform for JS developers in the world. Meanwhile, the front end hates Microsoft because it has been plagued by COMPATIBILITY issues with IE for years! But rich, wayward Microsoft bought GitHub for $7.5 billion!

In addition, GitHub’s tech geeks took years to completely remove the GitHub site in a very formal process:

  • Implementation of ESlint plugin eslint-plugin-jquery to prohibit the use of deprecated jquery methods in code. This prevents colleagues from using jQuery methods.
  • Two jQUERy-dependent modules – jquery-Pjax and FaceBox were rewritten using native code.
  • Develop a custom version of jQuery, and once a jQuery method is completely removed, remove the corresponding code in jQuery. This will both reduce the size of jQuery and prevent colleagues from using jQuery methods that have been removed.
  • Based on user statistics, gradually abandon support for lower versions of IE so that you don’t have to rely on jQuery to ensure compatibility.

Whether or not to use jQuery varies from person to person, but GitHub’s process for deprecating jQuery is professional enough to serve as a standard specification for dealing with technical debt.

Microsoft is in love with JavaScript

Microsoft seems to have fallen in love with JavaScript. Office 365, Microsoft Teams, and Skype have all been rewritten using JavaScript. The reason is undoubtedly the cross-platform nature of JS. The same set of code runs in many places, although there are still many problems, but this future is not good, right?

Atwood’s Law

Any application that can be written in JavaScript, will eventually be written in JavaScript

Microsoft beat Netscape in the browser market by bundling Windows, but after years of trouncing Chrome, has finally thrown in the towel and decided to rewrite the browser based on Chromium. For JSer, that means, at the very least, that browser compatibility issues can be alleviated.

According to The State of JavaScript 2018, Microsoft’s Visual Studio Code has become The most popular code editor for JSer, with tens of millions of downloads of some popular plug-ins:

Microsoft, now the most valuable company in the world with a market capitalisation of more than Apple, has the luxury of buying GitHub, which has the most JS developers.

The Roman Empire of IT Microsoft is back on the rise, and that’s a big deal.

Oracle claims JavaScript sovereignty

Oracle will start charging for Java next year, albeit only for updates to U192 after JDK 8, which will probably upset a lot of Java developers…

In addition, Oracle asked an iOS developer to remove an App called “HTML5, CSS, JavaScript, HTML, Snippet Editor” from the App Store because it contained the word “JavaScript,” Oracle owns the trademark rights to JavaScript in the US.

Oracle can’t be bothered, so people are seriously suggesting renaming JavaScript. Of course it’s almost impossible, not in this lifetime…

reference

  • Here’s how JavaScript hackers steal Bitcoin, Vue developers don’t worry!
  • 10 foreign technology weekly newspapers worth subscribing to are highly recommended
  • ECMAScript 2018 features are confirmed

About Fundebug

Fundebug focuses on JavaScript, wechat applets, wechat mini games, Alipay applets, React Native, Node.js and Java real-time BUG monitoring. Since its official launch on November 11, 2016, Fundebug has handled more than 900 million error events in total, which has been recognized by many well-known users such as Google, 360, Kingsoft, and People’s Net. Welcome free trial!

Copyright statement

Reprint please indicate the author Fundebug and this article addresses: blog.fundebug.com/2018/12/25/…