By Craig Buckler

JavaScript: 2015 in Review

By Craig Buckler

JavaScript had a remarkable year. Despite reaching the grand age of twenty in May, news, projects and interest in the language continue to grow exponentially. Perhaps it’s the strange circles I move in, but I can’t think of another technology which moves at a similar pace. It’s becoming increasingly difficult to keep up so I hope this summary helps…

ECMAScript Flipped

The seven-year long wait for ECMAScript Harmony or ECMAScript 6.0 ended in June 2015 with an officially-completed specification.

ES6 was promptly re-branded ES2015 although I don’t know anyone who calls it that. The premise for the name change is good; 2015 was the year the specification was completed. JavaScript engines can now claim they’re fully ES2015-compliant and everyone understands. Unfortunately, marketing-types won’t like it one bit; no one’s going to claim ES2015 compatibility as of January 1, 2016 when it sounds out-of-date.

What does ES2015 mean for developers? Prepare yourself for delights such as:

  • classes
  • enhanced object literals
  • let and const
  • arrow functions
  • template strings
  • iterators
  • generators
  • destructuring
  • proxies
  • weakmap and weakset
  • symbols
  • promises
  • reflection

Much of it is syntactical sugar. For example, JavaScript will retain prototypal inheritance but offer classical inheritance-like class structures for those moaners developers migrating from other languages.

ES2015 support remains patchy but it’s possible to convert most code to ES5 using a transpiler such as Babel. It works well but that additional step can make testing and debugging more complicated. Personally, I’m a JavaScript Luddite who prefers to stick with the old ways until support has improved.

But forget about ES2015 for now — let’s move on to ES7/2016!

JavaScript Avengers Assembly

Hype reached fever-pitch in June with the announcement of WebAssembly; a low-level binary-packed assembly-like language for the web!

Delivering large applications to a browser isn’t always practical. A game or complex program could require many megabytes of source code which is downloaded, compiled to bytecode and eventually run as machine code. WebAssembly makes the process more efficient by compiling source to a simpler, faster-processing, JavaScript-engine-compatible bytecode and packaging it in a compact binary file. Browser code will therefore load and start faster. It won’t necessarily run faster than normal JavaScript but optimizations are possible.

We’ve visited binary land before. Flash, Silverlight, Java and Google Native Client (NaCl) all made a similar promises but WebAssembly should have a better chance given it:

  1. requires relatively simple changes to JavaScript engines
  2. won’t need a browser plug-in, and
  3. is backed by Google, Microsoft, Mozilla and Apple.

Excited? You’d better brush up on your C/C++ skills because that’s the target for the first WebAssembly compilers.

Node.js Forks Off

Node.js moved from a relatively niche runtime in 2014 to the must-have technology of 2015. Node.js is everywhere; your desktop, your server, your Raspberry Pi, your embedded devices and more. Even developers from other faiths adopt Node.js to use build tools such as Grunt and Gulp.

2015 saw the political squabbles surrounding Node end with the merging of the io.js fork. This meant Node.js v0.12 could be superseded by Node.js v4.0 in September. Yes, that’s a jump of three whole versions because io.js had reached version 3.0 and couldn’t go backward.

Of course, version numbers mean nothing … except to those who now think Node.js 4+ is more advanced than Ruby 2 and Python 3. Given v5 arrived one month later, it’s also overtaken .NET 4 and is rapidly catching PHP 7!


Framework Fatigue

2,269 new JavaScript frameworks were launched in 2015. I invented that number with absolutely no research but few people will doubt it. It’s difficult to keep track…

  • AngularJS remains popular but usage may have plateaued given there’s no upgrade path to version 2.0 when it’s launched in 2016
  • React has been attracting strong interest
  • Meteor pledges a full-stack isomorphic JavaScript application platform
  • Vue.js reached version 1.0 and Aurelia was launched
  • Ember, Knockout and Backbone.js are still going strong
  • some, such as Rendr, looked as though they would become popular but weren’t.

It’s impossible for JavaScript developers to back a particular codebase with confidence. There’s too much fragmentation and monolithic all-in-one frameworks can cause as many problems as they solve. It can be dangerous to rely on a framework which abstracts the underlying technology and, according to this wise fellow, front-end JavaScript-dependency is plain wrong.

Use a framework if you must but never presume it’s viable over the long-term. Newer and better alternatives will appear before you’re half-way through your project. Never forget frameworks are an option — you don’t have to use one. Smaller, nimbler projects with minimal dependencies are a safer bet.

Tooling Tidal-Wave

Do you remember the carefree days when web development only required a browser, a text editor and an FTP client? Today you need Node.js, Gulp/Grunt, git, static HTML generators, Sass compilers, Autoprefixer, minifiers, uglifiers, linters, BrowserSync and a range of other build tools to create a basic “Hello World” page.

It’s mostly good. We are developing ever-more complex web applications and the tools allow us to automate mundane processes and concentrate on the more interesting tricky parts. 2015 has been a great year for:

  • Atom 1.0 — GitHub’s Node.js-powered hackable editor, was launched in June
  • PostCSS — the fast, modular CSS processor gets, gets my award for tool of the year
  • a slew of new browsers including Edge and Vivaldi plus numerous developer tool enhancements.

Yet, despite all these free optimization tools, the average web page weighs more than 2MB and consists of one hundred separate files. Is that progress? Perhaps not if you read Klint Finley’s I Turned Off JavaScript for a Whole Week and It Was Glorious. It’s not really the fault of the technology but the implementation. Switching off JavaScript blocks adverts, pop-ups, modal dialogs, infinitely-scrolling pages, social sign-up prompts, newsletter naggers and all the other irritating bloat we consider vital on web pages.

Some companies are hoping to stop web page rot with alternatives such as Facebook Instant and Google Accelerated Mobile Pages. I’m not convinced a segregated non-standard web is the answer.

And Finally

It’s official: Node.js is better than PHP! Admittedly, the article didn’t make that claim but it illustrated how far Node.js has come. Perhaps PHP would now win given the version 7 speed increases but, ultimately, use whatever you feel comfortable with. Controversially, Automattic recently converted their front-end from PHP to Node.js but I suspect that says more about the state of the Calypso project than the languages.

The technical buzz word of 2015 was “isomorphic”. SitePoint has discussed it and provided example code but, in essence, it means the JavaScript code you write once works anywhere — in a browser or on the server. It’s relatively simple for small, self-contained utilities but quickly becomes mind-numbingly complicated.

The first alpha of jQuery 3.0 was released in July. Two new versions are promised; one for modern browsers and a Compat edition which includes IE8 support. The team is anticipating few breaking changes which is a considerable achievement.

In December, Mozilla announced they would stop selling JavaScript-powered Firefox OS smartphones. It’s not the end for Firefox OS — development continues and it’s used in some Smart TVs — but the signs aren’t good. Perhaps it’s better to bet on OS-agnostic installable, offline web applications?

The biggest corporate JavaScript surprises of 2015 came from Microsoft with:

Given the recent openness toward the web, perhaps we should refer to the company as “new Microsoft”?

The Outlook for 2016

The attitude toward JavaScript has changed. A few years ago it was (unfairly) derided as an incomprehensible, buggy scripting language shunned by real developers. Today, you cannot avoid the language and the growth of tools, frameworks and projects will continue in 2016.

It’s not easy to keep pace but back JavaScript and you can’t go far wrong.

The most important and interesting stories in tech. Straight to your inbox, daily. Get Versioning.
Login or Create Account to Comment
Login Create Account