Tag Archives: ECMAScript

Video: If you wish to learn ES6/2015 from scratch, you must first invent the universe


Javascript has always been a language with very little syntactic sugar—for better or worse. With ES6/2015, and future iterations,though, Javascript is gaining a more and more abstract and expressive syntax. To some it might appear that our language—which already seems accessible and approachable for beginners—is becoming even more accessible and approachable. However, both the humanities and CS education research have proven that abstraction, while a powerful tool for knowledgeable practitioners, can be an equally powerful foil for beginners.

As we enter the era of language-level abstractions in ES6/2015, we are charged with the task of rethinking how we teach JavaScript. Through an interdisciplinary montage I will identify the problem of teaching abstraction as a ubiquitous demand across nearly every domain, and align the issues of creativity and critical thinking in the humanities with issues in computer science.

The talk will conclude with a discussion of how the discipline of computer science and that of the humanities can inform each other to produce more effective and creative solutions to both developing and teaching abstractions.

Expressive ES6 features that shine in NodeJS 4.0


Expressive ES6 features that shine in Node.js 4.0
// RethinkDB: the open

2015-09-21-node-4-es6.png

The developers behind Node.js released version 4.0 last week. The new version is a major update that includes significant improvements and many new language features. It is the first release to incorporate improvements from io.js, a community-driven fork that recently reintegrated with upstream Node.js.

The io.js project emerged earlier this year when prominent Node.js contributors decided to go their own way, seeking more open governance and a more predictable release cycle. They recently resolved their differences with Joyent, the corporate steward of the Node.js project. Following the reconciliation, the upstream maintainers adopted the io.js code base.

Node.js 4.0 includes the latest and greatest version of the V8 JavaScript runtime, which opens the door for developers to use a number of new language features from the ECMAScript 6 (ES6) specification. In previous versions of Node, important ES6 features were only available while using experimental command line flags. Some of our favorite new features supported out of the box in Node.js 4.x include arrow functions, generators, for/of loops, and template strings.

Transpiling ES6 Modules to AMD & CommonJS Using Babel & Gulp


via Transpiling ES6 Modules to AMD & CommonJS Using Babel & Gulp.

ECMAScript 6 (a.k.a ECMAScript 2015 or ES6), the specification for next version of JavaScript has been approved and browser vendors are hard at work implementing it Unlike the previous versions of ECMAScript, ES6 comes with a huge set of changes to the language to make it a good fit for the scale at which it is used today. Sitepoint has a number of articles covering these features.

Although browsers haven’t implemented all of the features yet, we can already take advantage of ES6 during development and convert it to a version that browser understands before shipping the application.Babel and Traceur are two of the leading transpilers used for this purpose. Microsoft’s typed superset of JavaScript, TypeScript can also be used as an ES6 transpiler.

I covered how ES6 can be used today to write Angular 1.x applications in one of my previous articles. In this article I used Traceur’s on-the-fly transpiler to run the application. Although it works, it is always better to transpile beforehand and reduce the amount of work to be done in the browser. In this article, we will see how the same sample application can be transpiled to ES5 and the modules into either CommonJS or, AMD using Babel to make it run on today’s browsers. Though the sample is based on Angular, the techniques of transpilation can be used with any valid ES6 code.

As ever, you can find the code to accompany this article on our GitHub repo.

Video ECMAScript 6: A Better JavaScript for the Ambient Computing Era


We’ve entered the Ambient Computing Era and JavaScript is its dominant programming language, But a new computing era needs a new and better JavaScript. It’s called ECMAScript 6 and it’s about to become the new JavaScript standard. Why do we need it? Why did it take so long? What’s in it? When can you use it? What comes next?

Transpiling ES6 Modules to AMD & CommonJS Using Babel & Gulp


via Transpiling ES6 Modules to AMD & CommonJS Using Babel & Gulp.

ECMAScript 6 (a.k.a ECMAScript 2015 or ES6), the specification for next version of JavaScript has been approved and browser vendors are hard at work implementing it Unlike the previous versions of ECMAScript, ES6 comes with a huge set of changes to the language to make it a good fit for the scale at which it is used today. Sitepoint has a number of articles covering these features.

Although browsers haven’t implemented all of the features yet, we can already take advantage of ES6 during development and convert it to a version that browser understands before shipping the application.Babel and Traceur are two of the leading transpilers used for this purpose. Microsoft’s typed superset of JavaScript, TypeScript can also be used as an ES6 transpiler.

I covered how ES6 can be used today to write Angular 1.x applications in one of my previous articles. In this article I used Traceur’s on-the-fly transpiler to run the application. Although it works, it is always better to transpile beforehand and reduce the amount of work to be done in the browser. In this article, we will see how the same sample application can be transpiled to ES5 and the modules into either CommonJS or, AMD using Babel to make it run on today’s browsers. Though the sample is based on Angular, the techniques of transpilation can be used with any valid ES6 code.

As ever, you can find the code to accompany this article on our GitHub repo.

Experiment with ECMAScript 6 on BabylonJS with TypeScript 1.5


via Experiment with ECMAScript 6 on Babylon.js with TypeScript 1.5.

This article is part of a web development series from Microsoft. Thank you for supporting the partners who make SitePoint possible.

Since releasing babylon.js, the WebGL open-source gaming framework, a couple of years ago, we (with help from the community) are constantly exploring ways to make it even better. I’m definitely more than happy that we decided more than one year ago to switch over to TypeScript. For more on that decision, read why we decided to move from plain JavaScript to TypeScript for Babylon.js

Thanks to TypeScript, we’ve been able to improve the quality of our code, improve our productivityand create our fabulous Playground we’re so proud of: http://www.babylonjs-playground.com/, which provides auto-completion in the browser! We’ve also been able to welcome some new team members coming from a C# background and few JS skills with no pain. But thanks to the TypeScript compiler, we can also test the future without rewriting a single line of code!

We are still coding babylon.js using Visual Studio and TFS while pushing in a regular manner our code to the github repo. By upgrading our project to Visual Studio 2015 RTM, we’ve been able to upgrade it toTypeScript 1.5.

ES7 async/await with Aurelia


via ES7 async/await with Aurelia.

In this post we’ll cover how the new Async/await keywords can be used in conjunction with Aurelia’s screen activation lifecycle.

In Aurelia you can opt-in to any of the screen activation lifecycle events by implementing the appropriate method on your viewmodel. If your method returns a promise, the router will wait for the promise to resolve before proceeding to the next step.