2014-08

Video: JavaScript coding tips

[2014-08-13] dev, javascript, jslang, video

The following video is a recording of the talk “JavaScript coding tips”, which I held 2014-05-16 at the Sud Web Conference in Toulouse, France.

How should I format the ECMAScript 6 generator asterisk?

[2014-08-05] esnext, dev, javascript, jslang

[Update 2015-03-30] This blog post is now a section in “ES6 generators in depth”.

The asterisk (*) is used by ECMAScript 6 to mark generator-related constructs [^1]. In each case, you have considerable freedom w.r.t. adding or omitting whitespace before and after this character. This blog post explains how to best format the asterisk and why.

Using ECMAScript 6 today

[2014-08-01] esnext, dev, javascript, jslang

ECMAScript 6 (ES6) still sounds like something from the future. After all, it will only become a standard by mid 2015. However, its features are continually appearing in browsers and there are compilers that translate ES6 code to ES5 code. The latter is already a compelling solution, because the ECMAScript 6 feature set is already frozen.

This blog post gives a brief overview of ECMAScript 6 features and describes tools that enable you to use them today.

2014-07

Dispatched and direct method calls in ECMAScript 5 and 6

[2014-07-27] esnext, dev, javascript, jslang

There are two ways to call methods in JavaScript:

  • via dispatch, e.g. obj.someMethod(arg0, arg1)
  • directly, e.g. someFunc.call(thisValue, arg0, arg1)

This blog post explains how these two work and why you will rarely call methods directly in ECMAScript 6.

The roles of AngularJS and Polymer

[2014-07-18] dev, javascript, webcomponents, angularjs, polymer, clientjs

A key feature of AngularJS 2.0 is its support for Web Components [^1]. Google’s Polymer is a Web Component polyfill (enabling them on all current browsers) and a framework on top of Web Components. This blog post describes how the Angular team sees the roles of AngularJS and Polymer.

The roles, according to the AngularJS team  

AngularJS 2.0 team member Rob Eisenberg recently explained the relationship between AngularJS and Polymer:

A JavaScript survival guide

[2014-07-14] dev, javascript

Are you a programmer who is considering learning JavaScript, but unsure whether it is worth the pain? Then this blog post is for you: I argue that it is worth it and give tips for surviving the language.

The five stages of coming to terms with JavaScript

[2014-07-13] dev, javascript, humor

React JSX via ECMAScript 6 template strings

[2014-07-09] esnext, dev, template literals, javascript

Facebook’s React has an optional language extension that enables you to embed HTML inside JavaScript. This extension can make your code more concise, but it also breaks compatibility with the rest of the JavaScript ecosystem. ECMAScript 6 will have template strings [^1], which enable you to implement JSX (or something close to it) inside the language. Jonathan Raphaelson has done so and the result looks as follows.

Three Google I/O videos about Web Components and Polymer

[2014-07-07] dev, javascript, webcomponents, polymer, googleio, clientjs, video

The videos of the Google I/O 2014 talks have been online for a while now. Three of them are about Web Components and Polymer. This blog post briefly describes what they are about and mentions a few highlights, which may help you to decide which videos you want to watch.

Ideas for fixing unconnected computing

[2014-07-05] mobile, computers

I traveled quite a bit recently and got exposed to a negative aspect of current technology: Things work well if you have a solid internet connection with no traffic limits and are plugged into a power outlet. Otherwise, things do not work well at all. This blog post describes the problems that arise and suggests solutions.