Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
Making ES6 happen with ChakraCore and Node
Chris Heilmann @codepo8, NodeConf, London, May 2015
Of innovation and impatience
Chris Heilmann @codepo8, Future Decoded, London, Nov 2015
CHRIS HEILMANN
@CODEPO8
①
②
③
④
⑤
⑥
⑦
The JavaScript promise and problem
The Node revolution
Problems with the node approach
Making ES6 happen - or not
OMG, not a second engine!
Looking ahead
My hopes and wishes
①
②
③
④
⑤
⑥
⑦
The JavaScript promise and problem
😀 Making the web much more interactive
😀 Easy to learn without any tooling overhead - use
whatever you want.
😀 Doesn’t need any compilation or conversion step -
works straight up in the browser
😀 Forgiving and dynamic language allows for lot of
different and adventurous development styles
①
②
③
④
⑤
⑥
⑦
The JavaScript promise and problem
🙄 Making the web much more interactive
🙄 Easy to learn without any tooling overhead - use
whatever you want.
🙄 Doesn’t need any compilation or conversion step -
works straight up in the browser
🙄 Forgiving and dynamic language allows for lot of
different and adventurous development styles
①
②
③
④
⑤
⑥
⑦
The JavaScript promise and problem
①
②
③
④
⑤
⑥
⑦
The JavaScript promise and problem
All other basic web
standards (HTML/CSS)
are designed to be fault
tolerant.
JavaScript is not.
①
②
③
④
⑤
⑥
⑦
The JavaScript promise and problem
①
②
③
④
⑤
⑥
⑦
The JavaScript promise and problem
①
②
③
④
⑤
⑥
⑦
The JavaScript promise and problem
Browsers are all broken
and annoying.
Let’s fix all the things
ourselves!
①
②
③
④
⑤
⑥
⑦
The JavaScript promise and problem
①
②
③
④
⑤
⑥
⑦
The JavaScript promise and problem
①
②
③
④
⑤
⑥
⑦
The JavaScript promise and problem
①
②
③
④
⑤
⑥
⑦
The JavaScript promise and problem
①
②
③
④
⑤
⑥
⑦
The JavaScript promise and problem
①
②
③
④
⑤
⑥
⑦
Node to the rescue
😀 With Node we liberated ourselves from the woes
of the web
😀 We could concentrate on using JavaScript and
build all kind of things from micro services and
bespoke servers up to huge applications
😀 We control the environment
😀 We can innovate the approach to using
JavaScript and imitate, build upon or improve
what other languages do
①
②
③
④
⑤
⑥
⑦
Problems with the node approach
①
②
③
④
⑤
⑥
⑦
Problems with the node approach
😠 We limited ourselves to one JavaScript engine -
monoculture is never a good plan
😠 We build towards the capabilities of one engine
instead of a standard
😠 We run into the danger of relying too much on
dependencies (see: left-pad)
😠 Politics and a harsh, very engineering, comp-sci
driven approach
😠 “Hey, it works…”
①
②
③
④
⑤
⑥
⑦
Making ES6 happen - or not
😀 ES6 is a great opportunity to clean up our act as
a JavaScript community
😀 We have a new, ratified standard
😀 This standard has truckloads of good features that
make library usage unnecessary
😀 It is also a great opportunity to re-vamp our
educational materials and fade out old, bad
advice
①
②
③
④
⑤
⑥
⑦
Making ES6 happen - or not
1997 2015
1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015
1997
ECMAScript1
1998
ECMAScript2
1999
ECMAScript3
2005 - 2007
ECMAScript4 - Abandoned
2009
ECMAScript5
2015
ECMAScript6
①
②
③
④
⑤
⑥
⑦
Making ES6 happen - or not
Library Builders
map, set & weakmap
__proto__
Proxies
Symbols
Sub7classable built7ins
Scalable Apps
let, const & block7
scoped bindings
Classes
Promises
Iterators
Generators
Typed arrays
Modules
Syntactic Sugar
Arrow functions
Enhanced object literals
Template strings
Destructuring
Rest, Spread, Default
String, Math, Number,
Object, RegExp APIs
①
②
③
④
⑤
⑥
⑦
Making ES6 happen - or not
http://kangax.github.io/compat-table/es6/
①
②
③
④
⑤
⑥
⑦
Making ES6 happen - or not
http://babeljs.io
①
②
③
④
⑤
⑥
⑦
Making ES6 happen - or not
①
②
③
④
⑤
⑥
⑦
Making ES6 happen - or not
https://github.com/samccone/The-cost-of-transpiling-es2015-in-2016
①
②
③
④
⑤
⑥
⑦
OMG, not a second engine!
①
②
③
④
⑤
⑥
⑦
OMG, not a second engine!
😀 ChakraCore is now available to power node
😀 Breaking the monoculture
😀 Highly optimised to run in low end environments
😀 Brand new engine, without overhead from old
browser dependencies
①
②
③
④
⑤
⑥
⑦
OMG, not a second engine!
①
②
③
④
⑤
⑥
⑦
OMG, not a second engine!
①
②
③
④
⑤
⑥
⑦
OMG, not a second engine!
https://www.youtube.com/watch?v=1bfDB3YPHFI
①
②
③
④
⑤
⑥
⑦
OMG, not a second engine!
https://blogs.windows.com/msedgedev/2016/01/19/nodejs-chakracore-mainline/
①
②
③
④
⑤
⑥
⑦
OMG, not a second engine!
https://blogs.windows.com/msedgedev/2016/01/19/nodejs-chakracore-mainline/
①
②
③
④
⑤
⑥
⑦
OMG, not a second engine!
https://blogs.windows.com/msedgedev/2016/01/19/nodejs-chakracore-mainline/
①
②
③
④
⑤
⑥
⑦
OMG, not a second engine!
https://github.com/Microsoft/ChakraCore
①
②
③
④
⑤
⑥
⑦
Looking ahead
🏅 Node should be the place where we kick the tires
of JavaScript
🏅 We build the tools we use to build things in
Node, so let’s not repeat the mistakes we did on
the web
🏅 We can educate developers in our tools rather
than outside it
🏅 If we want node to take off, we also need to
embrace the needs of people outside our
community.
①
②
③
④
⑤
⑥
⑦
My hopes and wishes
①
②
③
④
⑤
⑥
⑦
My hopes and wishes
🦄 Less drama and more documentary
🦄 Embrace constant change and avoid
monoculture
🦄 Don’t forget to keep things simple
🦄 Stop making computer science a religion - the
web was built by everyone
🦄 User choice and user experience should always
trump developer convenience
🦄 Teaching beats preaching…
THANKS!
CHRIS HEILMANN
@CODEPO8
CHRISTIANHEILMANN.COM

More Related Content

NodeConfLondon - Making ES6 happen with ChakraCore and Node