2015-08

What happened to Web Components?

[2015-08-29] dev, webcomponents, clientjs

Three years ago, there was a lot of excitement surrounding Web Components: everybody talked about them, the frameworks Ember and Angular planned to integrate them or even be based on them, etc.

By now, that excitement seems to have died down. This blog post examines what happened to Web Components. Spoiler: they are alive and well and slowly being adopted across browsers.

Logging variables via an ES6 tagged template

[2015-08-27] esnext, dev, javascript, template literals

This blog post shows how you can use a tagged template to log variables more efficiently.

In order to understand it, you should be familiar with ECMAScript 6 template literals and tagged templates. For an introduction, consult chapter “Template literals and tagged templates” of “Exploring ES6”.

Is “Isomorphic JavaScript” a good term?

[2015-08-24] dev, javascript

A recent trend in the web development world is to use JavaScript on the server to assemble pages there, with the same code that is used to manage them in the client. That lets you initially see content faster, especially on mobile devices and helps with search engines.

How are we supposed to call code that runs on either server or client? Michael Jackson doesn’t like a recent proposal:

Five little-known facts about ES5 object literals

[2015-08-20] dev, javascript, jslang

This blog post describes five little known facts about ECMAScript 5 (ES5) object literals:

  1. ECMAScript 5 has getters and setters
  2. Trailing commas are legal
  3. You often don’t have to quote property keys
  4. You can use reserved words as unquoted property keys
  5. Using objects as dictionaries is surprisingly tricky

Converting ES6 Maps to and from JSON

[2015-08-17] esnext, dev, javascript

When you have key-value data whose keys you don’t know in advance, it’s generally better to store it in an ES6 Map than in an object. But how do you convert Maps to and from JSON? This blog post tells you.

Getting started with ECMAScript 6

[2015-08-06] esnext, dev, javascript

This blog post helps you to get started with ECMAScript 6 (ES6):

  • It explains how you can interactively try out ES6.
  • It lists ES6 features that are easy to adopt, along with how those features are coded in ES5.

2015-07

New regular expression features in ECMAScript 6

[2015-07-29] esnext, dev, javascript

This blog post explains new regular expression features in ECMAScript 6. It helps if you are familiar with ES5 regular expression features and Unicode. Consult the following two chapters of “Speaking JavaScript” if you aren’t:

What do ES6 modules export?

[2015-07-23] esnext, dev, javascript

CommonJS modules export values, while ES6 modules export immutable bindings. This blog post explains what that means.

You should be loosely familiar with ES6 modules. If you aren’t, you can consult the chapter on modules in “Exploring ES6”.

What are your favorite JavaScript ES6 features?

[2015-07-21] esnext, dev, javascript

I’ve created a survey to find out what ES6 (a.k.a. ECMAScript 2015) features people like most:

2015-06

Tail call optimization in ECMAScript 6

[2015-06-30] esnext, dev, javascript

Update 2018-05-09: Even though tail call optimization is part of the language specification, it isn’t supported by many engines and that may never change. The ideas are still interesting, however and explained in this blog post.

ECMAScript 6 offers tail call optimization, where you can make some function calls without growing the call stack. This blog post explains how that works and what benefits it brings.