SlideShare a Scribd company logo
Next Generation Javascript - Now!
Traceur
Traceur - Javascript.next - Now! RheinmainJS April 14th
@casarock
Javascript.next!
EcmaScript6
var square = (x) => {

	 return x * x;

};

var square2 = x => x * x;
Fat Arrow Functions
function* fibonacci() {

let [prev, curr] = [0, 1];

for (;;) {

[prev, curr] = [curr, prev + curr];

yield curr;

}

}
Generators
function restParam(array, ...items) { … }

function defaultParam(myArg = 0) { … }

function restPrmWithSpreadOp(arr, ...items) { 

	 arr(...items);

}
Default-, rest-Param & Spread-
Operator
const PI = 3.14;

let answer = 42;
Let & Const
Traceur - RheinMainJS April 2014
@casarock
Javascript.next!
EcmaScript6
class Character {

constructor(x, y) {

this.x = x;

this.y = y;

}

}



class Monster extends Character {

constructor(x, y, name) {

super(x, y);

this.name = name;

this.health_ = 100; 

….

}
class & Extend
var {x, y} = {

	 x: 123,

	 y: 321

}

var [a, b, c] = [´hello´, ´rmjs´, ´at AOE´];
Destructuring
function timeout(ms) {

return new Promise((resolve) = > {

setTimeout(resolve, ms);

});

}



timeout(100).then(() = > {

console.log('done');

});
Promises … and many more...
Traceur - RheinMainJS April 2014
@casarock
V34:

• Supports 35 of 68 features

• no classes, generator, arrow functions, rest
parameter etc..

• mostly new Math methods & String operations

• Supports Maps & Weak Maps
Google Chrome
V29:

• Supports 48/68 features

• no classes. no promises

• Best ES6 support so far!
Mozilla Firefox
IE11:

• Supports 7 of 68 features…

• well… at least let and const.
Internet Explorer
Harmony

• Supports 22 of 68 features…

• no classes, no promises.
Node
Cool, but what about
BrowserSupport?
Traceur - RheinMainJS April 2014
http://kangax.github.io/es5-compat-table/es6/
ANDSAFARI? 2/68
@casarock
I want to use it,
ButHOW?
Browser Detection…
… and deliver different JS?
… or Add a „Best viewed in Firefox“-Button?
Traceur - RheinMainJS April 2014
without coffee!
CrossCompile!
@casarock
parcour?
Tracer?Traceur!
• Cross compiler ES6 -> ES5
• Maintained by Google
!
• Compilation while build
• JIT Compilation at execution time…
• Traceur is written in ES6 cross compiled to es5!
!
• Open source! 

https://github.com/google/traceur-compiler
Traceur - RheinMainJS April 2014
@casarock
And how about
ES6Support?
Supports only 23/68 features!
Traceur - RheinMainJS April 2014
• classes
• promises
• let/Const
• rest-/Spread Params
• Generators
• Destructuring
@casarock
Why should I
USETRACEUR?
• One Codebase
• compilation withIN build script
• Less Browser specific Code
• Use next Gen JS NOW!
• Continuously developed
• Browser independent development & Release
Traceur - RheinMainJS April 2014
Let’s get real!
ENOUGHTHEORY
@casarock
I just want to
PlayAround!
Frontend Developers love Fiddles…
http://www.es6fiddle.net/
Traceur - RheinMainJS April 2014
@casarock
Let the client
CompileONRuntime
• Load Traceur
• Compile at USERs browser
• Get into Performance hell!
• Have fun with unhappy customers and
clients!
Traceur - RheinMainJS April 2014
@casarock
I want offline
CROSSCOMPILE
Install Traceur via NPM
$ npm install -g traceur
Compile your ES6 source
$ traceur --out out/mysource.js --script mySource.js
!
Using Compiled files: Include Traceur Runtime
<script src=„path/to/traceur-runtime.js“></script>
<script src=„out/mysource.js“></script>
!
Traceur needs a runtime for some polyfills and helpers
Traceur - RheinMainJS April 2014
@casarock
But I want
AutomatedBuilds
Grunt plugin
https://github.com/aaronfrost/grunt-traceur
!
Gulp Plugin
https://github.com/sindresorhus/gulp-traceur
Traceur - RheinMainJS April 2014
@casarock
How to configure
GRUNT
Grunt Plugin
$ npm install grunt-traceur —save-dev
grunt.loadNpmTasks('grunt-traceur');
grunt.initConfig({

traceur: {

options: {

// traceur options here

},

custom: {

files:{

'build/all.js': ['js/**/*.js']

}

},

}

});
Traceur - RheinMainJS April 2014
@casarock
But I want streams with
GULP
Gulp Plugin
$ npm install --save-dev gulp-traceur
var gulp = require('gulp');

var traceur = require('gulp-traceur');



gulp.task('default', function () {

return gulp.src('src/app.js')

.pipe(traceur({sourceMaps: true}))

.pipe(gulp.dest('dist'));

});
Traceur - RheinMainJS April 2014
Conclusion
@casarock
What I think about
TRACEURCompiler
• Use one ES6 Codebase now - Cross browser
(and with node.js)
• Consider Carefully
• Do you really need ES6 in your Project?
• Not every Dev knows ES6 Features
• You still need a runtime (performance?)
• <subjective>

If you want „native“ Classes and Cross
compile: Use Traceur! 

</subjective>
Traceur - RheinMainJS April 2014
I would like to
Thankyou!
I am
Carsten Sandtner
!
Web: http://www.appsbu.de
Twitter: @casarock
Mail: hallo@appsbu.de
Traceur - RheinMainJS April 2014@casarock

More Related Content

PPTX
Ansible lightning talk at Scale 12
PDF
Simple Tips and Tricks with Ansible
PDF
Python Performance Profiling: The Guts And The Glory
PPTX
Rubyslava + PyVo #48
PDF
Ansible Israel Kickoff Meetup
PPTX
Jk rubyslava 25
PDF
Rails course day 8
Ansible lightning talk at Scale 12
Simple Tips and Tricks with Ansible
Python Performance Profiling: The Guts And The Glory
Rubyslava + PyVo #48
Ansible Israel Kickoff Meetup
Jk rubyslava 25
Rails course day 8

What's hot (19)

PDF
PuppetConf 2016: Multi-Tenant Puppet at Scale – John Jawed, eBay, Inc.
PDF
What Is Async, How Does It Work, And When Should I Use It?
KEY
Ender
PDF
Locarise,reagent and JavaScript Libraries
PDF
Ansible on AWS
KEY
Rapid Prototyping FTW!!!
PDF
OSCamp #4 on Foreman | Ansible automation for Foreman by Ondřej Ezr
PDF
"fireap" - fast task runner on consul
PDF
Async await functions in ruby
PDF
3 ways-to-create-sprites-in-rails
PDF
Future of Development and Deployment using Docker
PDF
function* - ES6, generators, and all that (JSRomandie meetup, February 2014)
PDF
Go debugging and troubleshooting tips - from real life lessons at SignalFx
PDF
Go Profiling - John Graham-Cumming
PDF
Advanced Radiant
PDF
TensorFlow London 13.09.17 Ilya Dmitrichenko
PDF
Go memory
PDF
Ansible party in the [Google] clouds
PDF
Expoによるモバイルアプリ開発入門
PuppetConf 2016: Multi-Tenant Puppet at Scale – John Jawed, eBay, Inc.
What Is Async, How Does It Work, And When Should I Use It?
Ender
Locarise,reagent and JavaScript Libraries
Ansible on AWS
Rapid Prototyping FTW!!!
OSCamp #4 on Foreman | Ansible automation for Foreman by Ondřej Ezr
"fireap" - fast task runner on consul
Async await functions in ruby
3 ways-to-create-sprites-in-rails
Future of Development and Deployment using Docker
function* - ES6, generators, and all that (JSRomandie meetup, February 2014)
Go debugging and troubleshooting tips - from real life lessons at SignalFx
Go Profiling - John Graham-Cumming
Advanced Radiant
TensorFlow London 13.09.17 Ilya Dmitrichenko
Go memory
Ansible party in the [Google] clouds
Expoによるモバイルアプリ開発入門
Ad

Similar to Traceur - Javascript.next - Now! RheinmainJS April 14th (20)

PDF
ECMAScript 6
PDF
JavaScript in 2015
PDF
Ecmascript 2015 – best of new features()
PPTX
PDF
Advanced JavaScript Development
PDF
ECMAScript 6, o cómo usar el JavaScript del futuro hoy
PDF
Diving into HHVM Extensions (php[tek] 2016)
PPTX
Graal in GraalVM - A New JIT Compiler
PDF
V8 javascript engine for フロントエンドデベロッパー
PPT
AppengineJS
PDF
The Present and Future of the Web Platform
PDF
React Native Evening
KEY
JavaScript Growing Up
PDF
SF Big Analytics 20191112: How to performance-tune Spark applications in larg...
PDF
(2018) Webpack Encore - Asset Management for the rest of us
PDF
Complex Made Simple: Sleep Better with TorqueBox
PDF
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
KEY
PDF
Xopus Application Framework
PDF
ES6: The Awesome Parts
ECMAScript 6
JavaScript in 2015
Ecmascript 2015 – best of new features()
Advanced JavaScript Development
ECMAScript 6, o cómo usar el JavaScript del futuro hoy
Diving into HHVM Extensions (php[tek] 2016)
Graal in GraalVM - A New JIT Compiler
V8 javascript engine for フロントエンドデベロッパー
AppengineJS
The Present and Future of the Web Platform
React Native Evening
JavaScript Growing Up
SF Big Analytics 20191112: How to performance-tune Spark applications in larg...
(2018) Webpack Encore - Asset Management for the rest of us
Complex Made Simple: Sleep Better with TorqueBox
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Xopus Application Framework
ES6: The Awesome Parts
Ad

More from Carsten Sandtner (16)

PDF
State of Web APIs 2017
PDF
Headless in the CMS
PDF
Always on! Or not?
PDF
Night Watch with QA
PDF
Always on! ... or not?
PDF
WebVR - MobileTechCon Berlin 2016
PDF
Evolution der Web Entwicklung
PDF
WebVR - JAX 2016
PDF
HTML5 Games for Web & Mobile
PDF
What is responsive - and do I need it?
PDF
Web apis JAX 2015 - Mainz
PDF
Web APIs - Mobiletech Conference 2015
PDF
Web APIs – expand what the Web can do
PDF
Firefox OS - A (mobile) Web Developers dream - DWX14
PDF
Firefox OS - A (web) developers dream - muxCamp 2014
PDF
Mozilla Brick - Frontend Rhein-Main June 2014
State of Web APIs 2017
Headless in the CMS
Always on! Or not?
Night Watch with QA
Always on! ... or not?
WebVR - MobileTechCon Berlin 2016
Evolution der Web Entwicklung
WebVR - JAX 2016
HTML5 Games for Web & Mobile
What is responsive - and do I need it?
Web apis JAX 2015 - Mainz
Web APIs - Mobiletech Conference 2015
Web APIs – expand what the Web can do
Firefox OS - A (mobile) Web Developers dream - DWX14
Firefox OS - A (web) developers dream - muxCamp 2014
Mozilla Brick - Frontend Rhein-Main June 2014

Recently uploaded (20)

PPTX
AcademyNaturalLanguageProcessing-EN-ILT-M02-Introduction.pptx
PDF
Instagram's Product Secrets Unveiled with this PPT
PPTX
The Effect of Human Resource Management Practice on Organizational Performanc...
PPTX
Relationship Management Presentation In Banking.pptx
PDF
Nykaa-Strategy-Case-Fixing-Retention-UX-and-D2C-Engagement (1).pdf
PPTX
Introduction to Effective Communication.pptx
PPTX
BIOLOGY TISSUE PPT CLASS 9 PROJECT PUBLIC
PPTX
_ISO_Presentation_ISO 9001 and 45001.pptx
PPTX
Primary and secondary sources, and history
PPTX
Intro to ISO 9001 2015.pptx wareness raising
PPTX
Learning-Plan-5-Policies-and-Practices.pptx
PPTX
Project and change Managment: short video sequences for IBA
PPTX
Impressionism_PostImpressionism_Presentation.pptx
PPTX
Effective_Handling_Information_Presentation.pptx
PPTX
Non-Verbal-Communication .mh.pdf_110245_compressed.pptx
DOCX
"Project Management: Ultimate Guide to Tools, Techniques, and Strategies (2025)"
PPTX
An Unlikely Response 08 10 2025.pptx
PPTX
2025-08-10 Joseph 02 (shared slides).pptx
PPTX
Self management and self evaluation presentation
PPTX
Human Mind & its character Characteristics
AcademyNaturalLanguageProcessing-EN-ILT-M02-Introduction.pptx
Instagram's Product Secrets Unveiled with this PPT
The Effect of Human Resource Management Practice on Organizational Performanc...
Relationship Management Presentation In Banking.pptx
Nykaa-Strategy-Case-Fixing-Retention-UX-and-D2C-Engagement (1).pdf
Introduction to Effective Communication.pptx
BIOLOGY TISSUE PPT CLASS 9 PROJECT PUBLIC
_ISO_Presentation_ISO 9001 and 45001.pptx
Primary and secondary sources, and history
Intro to ISO 9001 2015.pptx wareness raising
Learning-Plan-5-Policies-and-Practices.pptx
Project and change Managment: short video sequences for IBA
Impressionism_PostImpressionism_Presentation.pptx
Effective_Handling_Information_Presentation.pptx
Non-Verbal-Communication .mh.pdf_110245_compressed.pptx
"Project Management: Ultimate Guide to Tools, Techniques, and Strategies (2025)"
An Unlikely Response 08 10 2025.pptx
2025-08-10 Joseph 02 (shared slides).pptx
Self management and self evaluation presentation
Human Mind & its character Characteristics

Traceur - Javascript.next - Now! RheinmainJS April 14th

  • 1. Next Generation Javascript - Now! Traceur
  • 3. @casarock Javascript.next! EcmaScript6 var square = (x) => {
 return x * x;
 }; var square2 = x => x * x; Fat Arrow Functions function* fibonacci() { let [prev, curr] = [0, 1]; for (;;) {
 [prev, curr] = [curr, prev + curr];
 yield curr;
 }
 } Generators function restParam(array, ...items) { … } function defaultParam(myArg = 0) { … } function restPrmWithSpreadOp(arr, ...items) { 
 arr(...items);
 } Default-, rest-Param & Spread- Operator const PI = 3.14; let answer = 42; Let & Const Traceur - RheinMainJS April 2014
  • 4. @casarock Javascript.next! EcmaScript6 class Character {
 constructor(x, y) {
 this.x = x;
 this.y = y;
 }
 }
 
 class Monster extends Character {
 constructor(x, y, name) {
 super(x, y);
 this.name = name;
 this.health_ = 100; 
 ….
 } class & Extend var {x, y} = {
 x: 123,
 y: 321
 } var [a, b, c] = [´hello´, ´rmjs´, ´at AOE´]; Destructuring function timeout(ms) {
 return new Promise((resolve) = > {
 setTimeout(resolve, ms);
 });
 }
 
 timeout(100).then(() = > {
 console.log('done');
 }); Promises … and many more... Traceur - RheinMainJS April 2014
  • 5. @casarock V34: • Supports 35 of 68 features • no classes, generator, arrow functions, rest parameter etc.. • mostly new Math methods & String operations • Supports Maps & Weak Maps Google Chrome V29: • Supports 48/68 features • no classes. no promises • Best ES6 support so far! Mozilla Firefox IE11: • Supports 7 of 68 features… • well… at least let and const. Internet Explorer Harmony • Supports 22 of 68 features… • no classes, no promises. Node Cool, but what about BrowserSupport? Traceur - RheinMainJS April 2014 http://kangax.github.io/es5-compat-table/es6/
  • 7. @casarock I want to use it, ButHOW? Browser Detection… … and deliver different JS? … or Add a „Best viewed in Firefox“-Button? Traceur - RheinMainJS April 2014
  • 9. @casarock parcour? Tracer?Traceur! • Cross compiler ES6 -> ES5 • Maintained by Google ! • Compilation while build • JIT Compilation at execution time… • Traceur is written in ES6 cross compiled to es5! ! • Open source! 
 https://github.com/google/traceur-compiler Traceur - RheinMainJS April 2014
  • 10. @casarock And how about ES6Support? Supports only 23/68 features! Traceur - RheinMainJS April 2014 • classes • promises • let/Const • rest-/Spread Params • Generators • Destructuring
  • 11. @casarock Why should I USETRACEUR? • One Codebase • compilation withIN build script • Less Browser specific Code • Use next Gen JS NOW! • Continuously developed • Browser independent development & Release Traceur - RheinMainJS April 2014
  • 13. @casarock I just want to PlayAround! Frontend Developers love Fiddles… http://www.es6fiddle.net/ Traceur - RheinMainJS April 2014
  • 14. @casarock Let the client CompileONRuntime • Load Traceur • Compile at USERs browser • Get into Performance hell! • Have fun with unhappy customers and clients! Traceur - RheinMainJS April 2014
  • 15. @casarock I want offline CROSSCOMPILE Install Traceur via NPM $ npm install -g traceur Compile your ES6 source $ traceur --out out/mysource.js --script mySource.js ! Using Compiled files: Include Traceur Runtime <script src=„path/to/traceur-runtime.js“></script> <script src=„out/mysource.js“></script> ! Traceur needs a runtime for some polyfills and helpers Traceur - RheinMainJS April 2014
  • 16. @casarock But I want AutomatedBuilds Grunt plugin https://github.com/aaronfrost/grunt-traceur ! Gulp Plugin https://github.com/sindresorhus/gulp-traceur Traceur - RheinMainJS April 2014
  • 17. @casarock How to configure GRUNT Grunt Plugin $ npm install grunt-traceur —save-dev grunt.loadNpmTasks('grunt-traceur'); grunt.initConfig({
 traceur: {
 options: {
 // traceur options here
 },
 custom: {
 files:{
 'build/all.js': ['js/**/*.js']
 }
 },
 }
 }); Traceur - RheinMainJS April 2014
  • 18. @casarock But I want streams with GULP Gulp Plugin $ npm install --save-dev gulp-traceur var gulp = require('gulp');
 var traceur = require('gulp-traceur');
 
 gulp.task('default', function () {
 return gulp.src('src/app.js')
 .pipe(traceur({sourceMaps: true}))
 .pipe(gulp.dest('dist'));
 }); Traceur - RheinMainJS April 2014
  • 20. @casarock What I think about TRACEURCompiler • Use one ES6 Codebase now - Cross browser (and with node.js) • Consider Carefully • Do you really need ES6 in your Project? • Not every Dev knows ES6 Features • You still need a runtime (performance?) • <subjective>
 If you want „native“ Classes and Cross compile: Use Traceur! 
 </subjective> Traceur - RheinMainJS April 2014
  • 21. I would like to Thankyou! I am Carsten Sandtner ! Web: http://www.appsbu.de Twitter: @casarock Mail: hallo@appsbu.de Traceur - RheinMainJS April 2014@casarock