Upgrade to Pro — share decks privately, control downloads, hide ads and more …

React meets Nashorn #jjug_ccc #ccc_l8 /react-me...

React meets Nashorn #jjug_ccc #ccc_l8 /react-meets-nashorn-jjug-ccc-2016-fall

JJUG CCC 2016 Fall で発表したスライドです

Manabu Matsuzaki

December 03, 2016
Tweet

More Decks by Manabu Matsuzaki

Other Decks in Technology

Transcript

  1. JDK™ 9 Early Access Releases ͷNashornͰES6Λ ࢼ͢ࣄ͕ग़དྷ·͢ • JDK™ 9

    Early Access Releases
 https://jdk9.java.net/download/ • JEP 292
 http://openjdk.java.net/jeps/292
  2. $ jjs -h jjs [<options>] <files> [-- <arguments>] … ུ

    … --language (Specify ECMAScript language version.) param: [es5|es6] default: es5 … ུ … JDK™ 9 Early Access Releases
 Build 146Ͱࢼͯ͠ΈΔ
  3. $ jjs --language=es6 jjs> let hello = (name) => 'Hello,

    ' + name; jjs> hello('World!'); Hello, World!
  4. jjs> class Greet { ...> constructor(v) { ...> this.v =

    v; ...> } ...> hello() { ...> return this.v; ...> } ...> } java.lang.RuntimeException: <shell>:1:0 ES6 class declarations and expressions are not yet implemented class Greet { ^
  5. ࠓޙͷES6ରԠʹ͍ͭͯ • JavaOne 2016ͰʮWhat’s New in JDK 9?ʯ
 ͱ͍͏ηογϣϯ͕͋Γ·ͨ͠
 ެ։͞ΕͨεϥΠυʹΑΔͱɺ


    "Follow ups in minor releases"ͱͷࣄ
 https://oracle.rainfocus.com/scripts/ catalog/oow16.jsp? event=javaone&search=nashorn&showEnr olled=false&search.event=javaone
  6. ެࣜνϡʔτϦΞϧΑΓൈਮ React is a declarative, efficient, and flexible JavaScript library

    for building user interfaces. 
 (React͸ϢʔβʔΠϯλʔϑΣΠεΛߏங͢ ΔͨΊͷએݴతͰޮ཰తͰॊೈͳJavaScript ϥΠϒϥϦͰ͢)
  7. • Java͸࠷৽όʔδϣϯΛ࢖͏ • Java 8u66ͰҎԼͷ໰୊͕fix͞Ε͍ͯΔ • Nashorn react.js benchmark performance

    regression
 http://www.oracle.com/technetwork/java/ javase/2col/8u66-bugfixes-2692105.html
 
 http://bugs.java.com/view_bug.do? bug_id=8134403
  8. ϦϯΫू • Java SE 8ͷ৽JavaScriptΤϯδϯʮNashornʯ͕࣮ݱ͢Δ࣍ੈ୅ͷ “JavaScript in Java”؀ڥ • JEP

    292 • What’s New in JDK 9? • Tutorial: Intro To React • SpringOne2GX 2015 replay: Isomorphic templating with Spring Boot, Nashorn and React • JDK 8u66 Bug Fixes • JDK-8134403 : Nashorn react.js benchmark performance regression • αϯϓϧιʔε