SlideShare una empresa de Scribd logo
1 de 69
Descargar para leer sin conexión
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.1
JavaScript Running On
JavaVM: Nashorn
NISHIKAWA, Akihiro
Oracle Corporation Japan
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.2
以下の事項は、弊社の一般的な製品の方向性に関する概要を説明するも
のです。また、情報提供を唯一の目的とするものであり、いかなる契約に
も組み込むことはできません。以下の事項は、マテリアルやコード、機能を
提供することをコミットメント(確約)するものではないため、購買決定を行う
際の判断材料になさらないで下さい。オラクル製品に関して記載されてい
る機能の開発、リリースおよび時期については、弊社の裁量により決定さ
れます。
OracleとJavaは、Oracle Corporation 及びその子会社、関連会社の米国及びその他の国における登録商標です。文中の
社名、商品名等は各社の商標または登録商標である場合があります。
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.3 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Agenda  Nashorn
 Server Side JavaScript
 Nashornの今後
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.4
Nashorn
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.5
Nashorn
Compact1 Profileでも使えるJavaScript Engine
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.6
Nashorn
Compact1 Profileでも使えるJavaScript Engine
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.7
登場の背景
 Rhinoの置き換え
– セキュリティ
– パフォーマンス
 InvokeDynamic (JSR-292) のProof of Concept
 アトウッドの法則
Any application that can be written in JavaScript will
eventually be written in JavaScript.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.8
Project Nashornの主なスコープ
JEP 174
 ECMAScript-262 Edition 5.1
 javax.script (JSR 223) API
 JavaとJavaScript間での相互呼び出し
 新しいコマンドラインツール(jjs)の導入
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.9
Java VM
Scripting Engine
(Nashorn)
Scripting API
(JSR-223)
JavaScript codeJava code
Other runtime
Other APIs jjs
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.10
$JAVA_HOME/bin/jjs
$JAVA_HOME/jre/lib/ext/nashorn.jar
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.11
ECMAScript-262 Edition 5.1に100%対応
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.12
未実装・未サポート
 ECMAScript 6 (Harmony)
– Generators
– 分割代入(Destructuring assignment)
– const, let, ...
 DOM/CSSおよびDOM/CSS関連ライブラリ
– jQuery, Prototype, Dojo, …
 ブラウザAPIやブラウザエミュレータ
– HTML5 canvas, HTML5 audio, WebGL, WebWorkers...
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.13
実行例
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.14
JavaからNashorn
ScriptEngineManager manager
= new ScriptEngineManager();
ScriptEngine engine
= manager.getEngineByName("nashorn");
engine.eval("print('hello world')");
engine.eval(new FileReader("hello.js"));
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.15
JavaからNashorn
JavaからScript functionを呼び出す
engine.eval("function hello(name) {
print('Hello, ' + name)}");
Invocable inv=(Invocable)engine;
Object obj=
inv.invokeFunction("hello","Taro");
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.16
JavaからNashorn
Script functionでInterfaceを実装する
engine.eval("function run(){
print('run() called’)
}");
Invocable inv =(Invocable)engine;
Runnable r=inv.getInterface(Runnable.class);
Thread th=new Threads(r);
th.start();
th.join();
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.17
NashornからJava
print(java.lang.System.currentTimeMillis());
jjs -fx ...
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.18
Nashorn for Scripting
Scripting用途で使えるように機能追加
 -scriptingオプション
 Here document
 Back quote
 String Interpolation
...
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.19
Nashorn Extensions
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.20
Nashorn Extensions
今日ご紹介するのは
 Java typeの参照を取得
 Javaオブジェクトのプロパティアクセス
 Lambda、SAM、Script関数の関係
 スコープおよびコンテキスト
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.21
Java type
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.22
Java.type
Rhinoでの表記(Nashornでも利用可)
var hashmap=new java.util.HashMap();
または
var HashMap=java.util.HashMap;
var hashmap=new HashMap();
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.23
Java.type
Nashornで推奨する表記
var HashMap=Java.type('java.util.HashMap');
var hashmap=new HashMap();
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.24
Java.type
Class or Package?
java.util.ArrayList
java.util.Arraylist
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.25
Java配列
Rhinoでの表記
var intArray=
java.lang.reflect.Array.newInstance(
java.lang.Integer.TYPE, 5);
var Array=java.lang.reflect.Array;
var intClass=java.lang.Integer.TYPE;
var array=Array.newInstance(intClass, 5);
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.26
Java配列
Nashornでの表記
var intArray=new(Java.type("int[]"))(5);
var intArrayType=Java.type("int[]");
var intArray=new intArrayType(5);
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.27
プロパティへのアクセス
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.28
getter/setter
var HashMap=Java.type('java.util.HashMap');
var map=new HashMap();
map.put('size', 2);
print(map.get('size')); // 2
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.29
プロパティ
var HashMap=Java.type('java.util.HashMap');
var map=new HashMap();
map.size=3;
print(map.size); // 3
print(map.size()); // 1
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.30
連想配列
var HashMap=Java.type('java.util.HashMap');
var map=new HashMap();
map['size']=4;
print(map['size']); // 4
print(map['size']()); // 1
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.31
Lambda, SAM,
and Script function
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.32
Lambda, SAM, and Script function
Script functionをLambdaオブジェクトやSAMインターフェースを実装するオブ
ジェクトに自動変換
var timer=new java.util.Timer();
timer.schedule(
function() { print('Tick') }, 0, 1000);
java.lang.Thread.sleep(5000);
timer.cancel();
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.33
Lambda, SAM, and Script function
Lambda typeのインスタンスであるオブジェクトを
Script functionのように取り扱う
var JFunction=
Java.type('java.util.function.Function');
var obj=new JFunction() {
// x->print(x*x)
apply: function(x) { print(x*x) }
}
print(typeof obj); //function
obj(9); // 81 Script functionっぽく
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.34
Scope and Context
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.35
Scope and Context
load と loadWithNewGlobal
 load
– 同じグローバル・スコープにScriptをロード
– ロードしたScriptにロード元のScriptと同じ名称の変数が存
在する場合、変数が衝突する可能性がある
 loadWithNewGlobal
– グローバル・スコープを新規作成し、そのスコープに
JavaScriptをロード
– ロード元に同じ名前の変数があっても衝突しない
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.36
Scope and Context
ScriptContextはBindingに紐付いた複数のスコープをサポート
ScriptContext ctx=new SimpleScriptContext();
ctx.setBindings(engine.createBindings(),
ScriptContext.ENGINE_SCOPE);
Bindings engineScope=
ctx.getBindings(ScriptContext.ENGINE_SCOPE);
engineScope.put("x", "world");
engine.eval("print(x)", ctx);
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.37
Scope and Context
スコープを区切るためにJavaImporterをwithと共に利用
with(new JavaImporter(java.util, java.io)){
var map=new HashMap(); //java.util.HashMap
map.put("js", "javascript");
map.put("java", "java");
print(map);
....
}
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.38
その他のNashorn Extensions
 Java配列とJavaScript配列の変換
– Java.from
– Java.to
 Javaクラスの拡張、スーパークラス・オブジェクトの取得
– Java.extend
– Java.super
など
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.39
Server Side JavaScript
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.40
Java EE for Next Generation Applications
HTML5に対応した、動的かつスケーラブルなアプリケーション提供のために
WebSockets
Avatar
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.41
Webアプリケーションアーキテクチャの進化
Request-Response and Multi-page application
Java EE/JVM
Presentation
(Servlet/JSP)
Business
Logic
Backend
ConnectivityBrowser
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.42
Webアプリケーションアーキテクチャの進化
Ajax (JavaScript) の利用
Java EE/JVM
Connectivity
(REST, SSE)
Presentation
(Servlet/JSP, JSF)
Business
Logic
Backend
ConnectivityBrowser
JavaScript
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.43
今風のWebアプリケーションアーキテクチャ
Presentationよりはむしろ接続性を重視
Java EE/JVM
Connectivity
(WebSocket,
REST, SSE)
Presentation
(Servlet/JSP, JSF)
Business
Logic
Backend
ConnectivityBrowser
View
Controller
JavaScript
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.44
How about Node.js?
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.45
既存サービスのモバイル対応例
Node.js
JavaScript
REST
SSE
WebSocket
Browser
View
Controller
JavaScript
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.46
How about
Node.js on JVM?
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.47
既存サービスのモバイル対応例
NodeをJava VMで動作させよう
Java EE/JVM
Node
Server
Business
Logic
Backend
Connectivity
Client
JavaScriptBrowser
View
Controller
JavaScript
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.48
Avatar.js
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.49
Avatar.js
 Node.jsで利用できるモジュールをほぼそのまま利用可能
– Express、async、socket.ioなど
– npmで取り込んだモジュールを認識
 利点
– Nodeプログラミングモデルの利用
– 既存資産、ナレッジ、ツールの活用
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.50
Avatar.js = Node + Java
Threadも含めたJavaテクノロジーを活用
JavaJavaScript
com.myorg.myObj
java.util.SortedSet
java.lang.Thread
require('async')
postEvent
Node App
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.51
Avatar
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.52
Avatar
サーバーサイドJavaScriptサービスフレームワーク
 REST、WebSocket、Server Sent Event (SSE) での
データ送受信に特化
 Node.jsのイベント駆動プログラミングモデルや
プログラミングモジュールを活用
 エンタープライズ機能(Java EE)との統合
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.53
*.html
*.js
*.css
HTTP
Application
Services
Avatar Modules
Node Modules
Avatar.js
Avatar Runtime
Avatar Compiler
Server Runtime (Java EE)
JDK 8 / Nashorn
Application
Views
REST/WebSocket/SSE
Avatar (Avatar EE)
変更通知
データ
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.54
HTTP
REST/WebSocket/SSE
Avatar Compiler
Application
Views
*.html
*.js
*.css
Application
Services
Avatar Modules
Node Modules
Avatar.js
Avatar Runtime
Server Runtime (Java EE)
JDK 8 / Nashorn
アーキテクチャ(Server)
変更通知
データ
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.55
Avatar Service
Java
JavaScript
HTTP Load Balancer
Services
Shared State
Services Services
変更通知
データ
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.56
Avatar Runtime
Server Runtime (Java EE)
Avatar Modules
Node Modules
Avatar.js
*.html
*.js
*.css
Application
Services
JDK 8 / Nashorn
アーキテクチャ(Client)
変更通知
データ
HTTP
REST/WebSocket/SSE
Application
Views
Avatar Compiler
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.57
Avatar and Avatar.js
progress steadily.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.58
Nashornの今後
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.59
Nashornの今後
 Bytecode Persistence (JEP 194)
http://openjdk.java.net/jeps/194
 Optimistic Typing
 その他
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.60
まとめ
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.61
まとめ
 Nashorn
– Javaと緊密に統合
– Rhinoからの移行にあたっては表記方法が変わっている箇
所があるので注意
– 今後も性能向上、機能追加、新しい仕様に対応
 Server Side JavaScript
– Avatar.js、Avatarは鋭意開発中
– ぜひFeedbackを!
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.62
Appendix
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.63
ソースコード
Shell 主としてjjsで利用
Compiler ソースからバイトコード (class) を生成
Scanner ソースからトークンを作成
Parser トークンからAST/IRを作成
IR スクリプトの要素
Codegen AST/IRからscript classのバイトコードを生成
Objects ランタイム要素 (Object、String、Number、Date、RegExp)
Scripts スクリプト用のコードを含むclass
Runtime ランタイムタスク処理
Linker JSR-292 (InvokeDynamic) に基づきランタイムで呼び出し先をバインド
Dynalink 最適なメソッドを検索(言語間で動作)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.64
Nashorn Documents
http://wiki.openjdk.java.net/display/Nashorn/Nashorn+Documentation
 Java Platform, Standard Edition Nashorn User's Guide
http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/nash
orn/
 Scripting for the Java Platform
http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/
 Oracle Java Platform, Standard Edition Java Scripting Programmer's
Guide
http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/prog_
guide/
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.65
Nashorn
http://openjdk.java.net/projects/nashorn/
 OpenJDK wiki – Nashorn
https://wiki.openjdk.java.net/display/Nashorn/Main
 Mailing List
nashorn-dev@openjdk.java.net
 Blogs
– Nashorn - JavaScript for the JVM
http://blogs.oracle.com/nashorn/
– Nashorn Japan
https://blogs.oracle.com/nashorn_ja/
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.66
Avatar.js
 Project Page
https://avatar-js.java.net/
 Mailing List
users@avatar-js.java.net
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.67
Avatar
 Project Page
https://avatar.java.net/
 Mailing List
users@avatar.java.net
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.68
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.69

Más contenido relacionado

La actualidad más candente

Troubleshooting Native Memory Leaks in Java Applications
Troubleshooting Native Memory Leaks in Java ApplicationsTroubleshooting Native Memory Leaks in Java Applications
Troubleshooting Native Memory Leaks in Java ApplicationsPoonam Bajaj Parhar
 
Modularization With Project Jigsaw in JDK 9
Modularization With Project Jigsaw in JDK 9Modularization With Project Jigsaw in JDK 9
Modularization With Project Jigsaw in JDK 9Simon Ritter
 
Monitoring and Troubleshooting Tools in Java 9
Monitoring and Troubleshooting Tools in Java 9Monitoring and Troubleshooting Tools in Java 9
Monitoring and Troubleshooting Tools in Java 9Poonam Bajaj Parhar
 
JSR107 State of the Union JavaOne 2013
JSR107  State of the Union JavaOne 2013JSR107  State of the Union JavaOne 2013
JSR107 State of the Union JavaOne 2013Hazelcast
 
Configuration for Java EE and the Cloud
Configuration for Java EE and the CloudConfiguration for Java EE and the Cloud
Configuration for Java EE and the CloudDmitry Kornilov
 
55 New Features in JDK 9
55 New Features in JDK 955 New Features in JDK 9
55 New Features in JDK 9Simon Ritter
 
Configuration for Java EE: Config JSR and Tamaya
Configuration for Java EE: Config JSR and TamayaConfiguration for Java EE: Config JSR and Tamaya
Configuration for Java EE: Config JSR and TamayaDmitry Kornilov
 
Java EE, What's Next? by Anil Gaur
Java EE, What's Next? by Anil GaurJava EE, What's Next? by Anil Gaur
Java EE, What's Next? by Anil GaurTakashi Ito
 
Apache Aries: A blueprint for developing with OSGi and JEE
Apache Aries: A blueprint for developing with OSGi and JEEApache Aries: A blueprint for developing with OSGi and JEE
Apache Aries: A blueprint for developing with OSGi and JEEmahrwald
 
What's new in the Java API for JSON Binding
What's new in the Java API for JSON BindingWhat's new in the Java API for JSON Binding
What's new in the Java API for JSON BindingDmitry Kornilov
 
Apache Karaf - Building OSGi applications on Apache Karaf - T Frank & A Grzesik
Apache Karaf - Building OSGi applications on Apache Karaf - T Frank & A GrzesikApache Karaf - Building OSGi applications on Apache Karaf - T Frank & A Grzesik
Apache Karaf - Building OSGi applications on Apache Karaf - T Frank & A Grzesikmfrancis
 
JVMs in Containers - Best Practices
JVMs in Containers - Best PracticesJVMs in Containers - Best Practices
JVMs in Containers - Best PracticesDavid Delabassee
 
Configuration with Apache Tamaya
Configuration with Apache TamayaConfiguration with Apache Tamaya
Configuration with Apache TamayaAnatole Tresch
 
CompletableFuture уже здесь
CompletableFuture уже здесьCompletableFuture уже здесь
CompletableFuture уже здесьDmitry Chuyko
 

La actualidad más candente (20)

Troubleshooting Native Memory Leaks in Java Applications
Troubleshooting Native Memory Leaks in Java ApplicationsTroubleshooting Native Memory Leaks in Java Applications
Troubleshooting Native Memory Leaks in Java Applications
 
Modularization With Project Jigsaw in JDK 9
Modularization With Project Jigsaw in JDK 9Modularization With Project Jigsaw in JDK 9
Modularization With Project Jigsaw in JDK 9
 
Monitoring and Troubleshooting Tools in Java 9
Monitoring and Troubleshooting Tools in Java 9Monitoring and Troubleshooting Tools in Java 9
Monitoring and Troubleshooting Tools in Java 9
 
HotSpotコトハジメ
HotSpotコトハジメHotSpotコトハジメ
HotSpotコトハジメ
 
Troubleshooting Tools In JDK
Troubleshooting Tools In JDKTroubleshooting Tools In JDK
Troubleshooting Tools In JDK
 
JSR107 State of the Union JavaOne 2013
JSR107  State of the Union JavaOne 2013JSR107  State of the Union JavaOne 2013
JSR107 State of the Union JavaOne 2013
 
Intro To OSGi
Intro To OSGiIntro To OSGi
Intro To OSGi
 
Configuration for Java EE and the Cloud
Configuration for Java EE and the CloudConfiguration for Java EE and the Cloud
Configuration for Java EE and the Cloud
 
Java EE for the Cloud
Java EE for the CloudJava EE for the Cloud
Java EE for the Cloud
 
55 New Features in JDK 9
55 New Features in JDK 955 New Features in JDK 9
55 New Features in JDK 9
 
Configuration for Java EE: Config JSR and Tamaya
Configuration for Java EE: Config JSR and TamayaConfiguration for Java EE: Config JSR and Tamaya
Configuration for Java EE: Config JSR and Tamaya
 
JavaCro'15 - Everything a Java EE Developer needs to know about the JavaScrip...
JavaCro'15 - Everything a Java EE Developer needs to know about the JavaScrip...JavaCro'15 - Everything a Java EE Developer needs to know about the JavaScrip...
JavaCro'15 - Everything a Java EE Developer needs to know about the JavaScrip...
 
Java EE, What's Next? by Anil Gaur
Java EE, What's Next? by Anil GaurJava EE, What's Next? by Anil Gaur
Java EE, What's Next? by Anil Gaur
 
Apache Aries: A blueprint for developing with OSGi and JEE
Apache Aries: A blueprint for developing with OSGi and JEEApache Aries: A blueprint for developing with OSGi and JEE
Apache Aries: A blueprint for developing with OSGi and JEE
 
What's new in the Java API for JSON Binding
What's new in the Java API for JSON BindingWhat's new in the Java API for JSON Binding
What's new in the Java API for JSON Binding
 
Apache Karaf - Building OSGi applications on Apache Karaf - T Frank & A Grzesik
Apache Karaf - Building OSGi applications on Apache Karaf - T Frank & A GrzesikApache Karaf - Building OSGi applications on Apache Karaf - T Frank & A Grzesik
Apache Karaf - Building OSGi applications on Apache Karaf - T Frank & A Grzesik
 
What's New in Java 9
What's New in Java 9What's New in Java 9
What's New in Java 9
 
JVMs in Containers - Best Practices
JVMs in Containers - Best PracticesJVMs in Containers - Best Practices
JVMs in Containers - Best Practices
 
Configuration with Apache Tamaya
Configuration with Apache TamayaConfiguration with Apache Tamaya
Configuration with Apache Tamaya
 
CompletableFuture уже здесь
CompletableFuture уже здесьCompletableFuture уже здесь
CompletableFuture уже здесь
 

Destacado

FunScript:F#からJavaScriptへのコンパイラー
FunScript:F#からJavaScriptへのコンパイラーFunScript:F#からJavaScriptへのコンパイラー
FunScript:F#からJavaScriptへのコンパイラーAlfonso Garcia-Caro
 
FirefoxOSで学ぶJavaScript作法
FirefoxOSで学ぶJavaScript作法FirefoxOSで学ぶJavaScript作法
FirefoxOSで学ぶJavaScript作法cch-robo
 
スクレイピングとPython
スクレイピングとPythonスクレイピングとPython
スクレイピングとPythonHironori Sekine
 
Pythonを取り巻く開発環境 #pyconjp
Pythonを取り巻く開発環境 #pyconjpPythonを取り巻く開発環境 #pyconjp
Pythonを取り巻く開発環境 #pyconjpYoshifumi Yamaguchi
 
2017冬の開発合宿vrオンラインゲーム
2017冬の開発合宿vrオンラインゲーム2017冬の開発合宿vrオンラインゲーム
2017冬の開発合宿vrオンラインゲームSyo Igarashi
 
【Topotal輪読会】JavaScript で学ぶ関数型プログラミング 2 章
【Topotal輪読会】JavaScript で学ぶ関数型プログラミング 2 章【Topotal輪読会】JavaScript で学ぶ関数型プログラミング 2 章
【Topotal輪読会】JavaScript で学ぶ関数型プログラミング 2 章YOSHIKAWA Ryota
 
power-assert in JavaScript
power-assert in JavaScriptpower-assert in JavaScript
power-assert in JavaScriptTakuto Wada
 
(エンジニアから見た)
最近のスマートウォッチ事情
(エンジニアから見た)
最近のスマートウォッチ事情(エンジニアから見た)
最近のスマートウォッチ事情
(エンジニアから見た)
最近のスマートウォッチ事情Tomoya Yamamoto
 
クライアントサイドjavascript簡単紹介
クライアントサイドjavascript簡単紹介クライアントサイドjavascript簡単紹介
クライアントサイドjavascript簡単紹介しくみ製作所
 
Drupal 8 における TypeScript を使用する JavaScript 開発の現状
Drupal 8 における TypeScript を使用する JavaScript 開発の現状Drupal 8 における TypeScript を使用する JavaScript 開発の現状
Drupal 8 における TypeScript を使用する JavaScript 開発の現状tom_konda
 
HTML5/JavaScriptで作るAndroidアプリ開発seminar
HTML5/JavaScriptで作るAndroidアプリ開発seminarHTML5/JavaScriptで作るAndroidアプリ開発seminar
HTML5/JavaScriptで作るAndroidアプリ開発seminarkujirahand kujira
 
次世代言語 Python による PyPy を使った次世代の処理系開発
次世代言語 Python による PyPy を使った次世代の処理系開発次世代言語 Python による PyPy を使った次世代の処理系開発
次世代言語 Python による PyPy を使った次世代の処理系開発shoma h
 
PHPとJavaScriptの噺
PHPとJavaScriptの噺PHPとJavaScriptの噺
PHPとJavaScriptの噺Shogo Kawahara
 
JavaScriptユーティリティライブラリの紹介
JavaScriptユーティリティライブラリの紹介JavaScriptユーティリティライブラリの紹介
JavaScriptユーティリティライブラリの紹介Yusuke Hirao
 
JavaScript基礎勉強会
JavaScript基礎勉強会JavaScript基礎勉強会
JavaScript基礎勉強会大樹 小倉
 
Python & PyConJP 2014 Report
Python & PyConJP 2014 ReportPython & PyConJP 2014 Report
Python & PyConJP 2014 Reportgree_tech
 
"Continuous Publication" with Python: Another Approach
"Continuous Publication" with Python: Another Approach"Continuous Publication" with Python: Another Approach
"Continuous Publication" with Python: Another ApproachDaisuke Miyakawa
 
デザイナーに知っておいてほしい事
デザイナーに知っておいてほしい事デザイナーに知っておいてほしい事
デザイナーに知っておいてほしい事Ikeda Ryou
 

Destacado (20)

FunScript:F#からJavaScriptへのコンパイラー
FunScript:F#からJavaScriptへのコンパイラーFunScript:F#からJavaScriptへのコンパイラー
FunScript:F#からJavaScriptへのコンパイラー
 
大規模JavaScript開発
大規模JavaScript開発大規模JavaScript開発
大規模JavaScript開発
 
FirefoxOSで学ぶJavaScript作法
FirefoxOSで学ぶJavaScript作法FirefoxOSで学ぶJavaScript作法
FirefoxOSで学ぶJavaScript作法
 
スクレイピングとPython
スクレイピングとPythonスクレイピングとPython
スクレイピングとPython
 
Zapier ppap-share
Zapier ppap-shareZapier ppap-share
Zapier ppap-share
 
Pythonを取り巻く開発環境 #pyconjp
Pythonを取り巻く開発環境 #pyconjpPythonを取り巻く開発環境 #pyconjp
Pythonを取り巻く開発環境 #pyconjp
 
2017冬の開発合宿vrオンラインゲーム
2017冬の開発合宿vrオンラインゲーム2017冬の開発合宿vrオンラインゲーム
2017冬の開発合宿vrオンラインゲーム
 
【Topotal輪読会】JavaScript で学ぶ関数型プログラミング 2 章
【Topotal輪読会】JavaScript で学ぶ関数型プログラミング 2 章【Topotal輪読会】JavaScript で学ぶ関数型プログラミング 2 章
【Topotal輪読会】JavaScript で学ぶ関数型プログラミング 2 章
 
power-assert in JavaScript
power-assert in JavaScriptpower-assert in JavaScript
power-assert in JavaScript
 
(エンジニアから見た)
最近のスマートウォッチ事情
(エンジニアから見た)
最近のスマートウォッチ事情(エンジニアから見た)
最近のスマートウォッチ事情
(エンジニアから見た)
最近のスマートウォッチ事情
 
クライアントサイドjavascript簡単紹介
クライアントサイドjavascript簡単紹介クライアントサイドjavascript簡単紹介
クライアントサイドjavascript簡単紹介
 
Drupal 8 における TypeScript を使用する JavaScript 開発の現状
Drupal 8 における TypeScript を使用する JavaScript 開発の現状Drupal 8 における TypeScript を使用する JavaScript 開発の現状
Drupal 8 における TypeScript を使用する JavaScript 開発の現状
 
HTML5/JavaScriptで作るAndroidアプリ開発seminar
HTML5/JavaScriptで作るAndroidアプリ開発seminarHTML5/JavaScriptで作るAndroidアプリ開発seminar
HTML5/JavaScriptで作るAndroidアプリ開発seminar
 
次世代言語 Python による PyPy を使った次世代の処理系開発
次世代言語 Python による PyPy を使った次世代の処理系開発次世代言語 Python による PyPy を使った次世代の処理系開発
次世代言語 Python による PyPy を使った次世代の処理系開発
 
PHPとJavaScriptの噺
PHPとJavaScriptの噺PHPとJavaScriptの噺
PHPとJavaScriptの噺
 
JavaScriptユーティリティライブラリの紹介
JavaScriptユーティリティライブラリの紹介JavaScriptユーティリティライブラリの紹介
JavaScriptユーティリティライブラリの紹介
 
JavaScript基礎勉強会
JavaScript基礎勉強会JavaScript基礎勉強会
JavaScript基礎勉強会
 
Python & PyConJP 2014 Report
Python & PyConJP 2014 ReportPython & PyConJP 2014 Report
Python & PyConJP 2014 Report
 
"Continuous Publication" with Python: Another Approach
"Continuous Publication" with Python: Another Approach"Continuous Publication" with Python: Another Approach
"Continuous Publication" with Python: Another Approach
 
デザイナーに知っておいてほしい事
デザイナーに知っておいてほしい事デザイナーに知っておいてほしい事
デザイナーに知っておいてほしい事
 

Similar a Nashorn : JavaScript Running on Java VM (Japanese)

What's new in Java 8
What's new in Java 8What's new in Java 8
What's new in Java 8jclingan
 
Java API for JSON Binding - Introduction and update
Java API for JSON Binding - Introduction and updateJava API for JSON Binding - Introduction and update
Java API for JSON Binding - Introduction and updateMartin Grebac
 
Jaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světě
Jaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světěJaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světě
Jaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světěDevelcz
 
Japanese Introduction to Oracle JET
Japanese Introduction to Oracle JETJapanese Introduction to Oracle JET
Japanese Introduction to Oracle JETGeertjan Wielenga
 
Project Avatar (Lyon JUG & Alpes JUG - March 2014)
Project Avatar (Lyon JUG & Alpes JUG  - March 2014)Project Avatar (Lyon JUG & Alpes JUG  - March 2014)
Project Avatar (Lyon JUG & Alpes JUG - March 2014)David Delabassee
 
Server Side JavaScript on the Java Platform - David Delabassee
Server Side JavaScript on the Java Platform - David DelabasseeServer Side JavaScript on the Java Platform - David Delabassee
Server Side JavaScript on the Java Platform - David DelabasseeJAXLondon2014
 
Graal and Truffle: Modularity and Separation of Concerns as Cornerstones for ...
Graal and Truffle: Modularity and Separation of Concerns as Cornerstones for ...Graal and Truffle: Modularity and Separation of Concerns as Cornerstones for ...
Graal and Truffle: Modularity and Separation of Concerns as Cornerstones for ...Thomas Wuerthinger
 
General Capabilities of GraalVM by Oleg Selajev @shelajev
General Capabilities of GraalVM by Oleg Selajev @shelajevGeneral Capabilities of GraalVM by Oleg Selajev @shelajev
General Capabilities of GraalVM by Oleg Selajev @shelajevOracle Developers
 
O Mundo Oracle e o Que Há de Novo no Java
O Mundo Oracle e o Que Há de Novo no JavaO Mundo Oracle e o Que Há de Novo no Java
O Mundo Oracle e o Que Há de Novo no JavaBruno Borges
 
Nashorn: Novo Motor Javascript no Java SE 8
Nashorn: Novo Motor Javascript no Java SE 8Nashorn: Novo Motor Javascript no Java SE 8
Nashorn: Novo Motor Javascript no Java SE 8Bruno Borges
 
Server Side JavaScript on the JVM - Project Avatar - QCon London March 2014
Server Side JavaScript on the JVM - Project Avatar - QCon London March 2014Server Side JavaScript on the JVM - Project Avatar - QCon London March 2014
Server Side JavaScript on the JVM - Project Avatar - QCon London March 2014David Delabassee
 
2015 Java update and roadmap, JUG sevilla
2015  Java update and roadmap, JUG sevilla2015  Java update and roadmap, JUG sevilla
2015 Java update and roadmap, JUG sevillaTrisha Gee
 
Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...
Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...
Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...AMD Developer Central
 
Java EE7
Java EE7Java EE7
Java EE7Jay Lee
 
What's new for JavaFX in JDK8 - Weaver
What's new for JavaFX in JDK8 - WeaverWhat's new for JavaFX in JDK8 - Weaver
What's new for JavaFX in JDK8 - WeaverCodemotion
 

Similar a Nashorn : JavaScript Running on Java VM (Japanese) (20)

Java 8
Java 8Java 8
Java 8
 
What's new in Java 8
What's new in Java 8What's new in Java 8
What's new in Java 8
 
Java API for JSON Binding - Introduction and update
Java API for JSON Binding - Introduction and updateJava API for JSON Binding - Introduction and update
Java API for JSON Binding - Introduction and update
 
Jaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světě
Jaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světěJaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světě
Jaroslav Tulach: GraalVM - z vývoje nejrychlejšího virtuálního stroje na světě
 
Jfxpub binding
Jfxpub bindingJfxpub binding
Jfxpub binding
 
Japanese Introduction to Oracle JET
Japanese Introduction to Oracle JETJapanese Introduction to Oracle JET
Japanese Introduction to Oracle JET
 
Project Avatar (Lyon JUG & Alpes JUG - March 2014)
Project Avatar (Lyon JUG & Alpes JUG  - March 2014)Project Avatar (Lyon JUG & Alpes JUG  - March 2014)
Project Avatar (Lyon JUG & Alpes JUG - March 2014)
 
Server Side JavaScript on the Java Platform - David Delabassee
Server Side JavaScript on the Java Platform - David DelabasseeServer Side JavaScript on the Java Platform - David Delabassee
Server Side JavaScript on the Java Platform - David Delabassee
 
Java EE Next
Java EE NextJava EE Next
Java EE Next
 
Graal and Truffle: Modularity and Separation of Concerns as Cornerstones for ...
Graal and Truffle: Modularity and Separation of Concerns as Cornerstones for ...Graal and Truffle: Modularity and Separation of Concerns as Cornerstones for ...
Graal and Truffle: Modularity and Separation of Concerns as Cornerstones for ...
 
General Capabilities of GraalVM by Oleg Selajev @shelajev
General Capabilities of GraalVM by Oleg Selajev @shelajevGeneral Capabilities of GraalVM by Oleg Selajev @shelajev
General Capabilities of GraalVM by Oleg Selajev @shelajev
 
O Mundo Oracle e o Que Há de Novo no Java
O Mundo Oracle e o Que Há de Novo no JavaO Mundo Oracle e o Que Há de Novo no Java
O Mundo Oracle e o Que Há de Novo no Java
 
Nashorn: Novo Motor Javascript no Java SE 8
Nashorn: Novo Motor Javascript no Java SE 8Nashorn: Novo Motor Javascript no Java SE 8
Nashorn: Novo Motor Javascript no Java SE 8
 
Server Side JavaScript on the JVM - Project Avatar - QCon London March 2014
Server Side JavaScript on the JVM - Project Avatar - QCon London March 2014Server Side JavaScript on the JVM - Project Avatar - QCon London March 2014
Server Side JavaScript on the JVM - Project Avatar - QCon London March 2014
 
2015 Java update and roadmap, JUG sevilla
2015  Java update and roadmap, JUG sevilla2015  Java update and roadmap, JUG sevilla
2015 Java update and roadmap, JUG sevilla
 
MySQL HA
MySQL HAMySQL HA
MySQL HA
 
MySQL Clusters
MySQL ClustersMySQL Clusters
MySQL Clusters
 
Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...
Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...
Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...
 
Java EE7
Java EE7Java EE7
Java EE7
 
What's new for JavaFX in JDK8 - Weaver
What's new for JavaFX in JDK8 - WeaverWhat's new for JavaFX in JDK8 - Weaver
What's new for JavaFX in JDK8 - Weaver
 

Más de Logico

Welcome, Java 15! (Japanese)
Welcome, Java 15! (Japanese)Welcome, Java 15! (Japanese)
Welcome, Java 15! (Japanese)Logico
 
Look into Project Valhalla from CLR viewpoint
Look into Project Valhalla from CLR viewpointLook into Project Valhalla from CLR viewpoint
Look into Project Valhalla from CLR viewpointLogico
 
Jvmls 2019 feedback valhalla update
Jvmls 2019 feedback   valhalla updateJvmls 2019 feedback   valhalla update
Jvmls 2019 feedback valhalla updateLogico
 
Project Helidon Overview (Japanese)
Project Helidon Overview (Japanese)Project Helidon Overview (Japanese)
Project Helidon Overview (Japanese)Logico
 
Oracle Code One 2018 Feedback (Server Side / Japanese)
Oracle Code One 2018 Feedback (Server Side / Japanese)Oracle Code One 2018 Feedback (Server Side / Japanese)
Oracle Code One 2018 Feedback (Server Side / Japanese)Logico
 
ADBA (Asynchronous Database Access)
ADBA (Asynchronous Database Access)ADBA (Asynchronous Database Access)
ADBA (Asynchronous Database Access)Logico
 
Java EE 8 Overview (Japanese)
Java EE 8 Overview (Japanese)Java EE 8 Overview (Japanese)
Java EE 8 Overview (Japanese)Logico
 
Another compilation method in java - AOT (Ahead of Time) compilation
Another compilation method in java - AOT (Ahead of Time) compilationAnother compilation method in java - AOT (Ahead of Time) compilation
Another compilation method in java - AOT (Ahead of Time) compilationLogico
 
Polyglot on the JVM with Graal (English)
Polyglot on the JVM with Graal (English)Polyglot on the JVM with Graal (English)
Polyglot on the JVM with Graal (English)Logico
 
CDI 2.0 (JSR 365) - Java Day Tokyo 2017 (English)
CDI 2.0 (JSR 365) - Java Day Tokyo 2017 (English)CDI 2.0 (JSR 365) - Java Day Tokyo 2017 (English)
CDI 2.0 (JSR 365) - Java Day Tokyo 2017 (English)Logico
 
Polyglot on the JVM with Graal (Japanese)
Polyglot on the JVM with Graal (Japanese)Polyglot on the JVM with Graal (Japanese)
Polyglot on the JVM with Graal (Japanese)Logico
 
Nashorn in the future (Japanese)
Nashorn in the future (Japanese)Nashorn in the future (Japanese)
Nashorn in the future (Japanese)Logico
 
これからのNashorn
これからのNashornこれからのNashorn
これからのNashornLogico
 
Nashorn in the future (English)
Nashorn in the future (English)Nashorn in the future (English)
Nashorn in the future (English)Logico
 

Más de Logico (14)

Welcome, Java 15! (Japanese)
Welcome, Java 15! (Japanese)Welcome, Java 15! (Japanese)
Welcome, Java 15! (Japanese)
 
Look into Project Valhalla from CLR viewpoint
Look into Project Valhalla from CLR viewpointLook into Project Valhalla from CLR viewpoint
Look into Project Valhalla from CLR viewpoint
 
Jvmls 2019 feedback valhalla update
Jvmls 2019 feedback   valhalla updateJvmls 2019 feedback   valhalla update
Jvmls 2019 feedback valhalla update
 
Project Helidon Overview (Japanese)
Project Helidon Overview (Japanese)Project Helidon Overview (Japanese)
Project Helidon Overview (Japanese)
 
Oracle Code One 2018 Feedback (Server Side / Japanese)
Oracle Code One 2018 Feedback (Server Side / Japanese)Oracle Code One 2018 Feedback (Server Side / Japanese)
Oracle Code One 2018 Feedback (Server Side / Japanese)
 
ADBA (Asynchronous Database Access)
ADBA (Asynchronous Database Access)ADBA (Asynchronous Database Access)
ADBA (Asynchronous Database Access)
 
Java EE 8 Overview (Japanese)
Java EE 8 Overview (Japanese)Java EE 8 Overview (Japanese)
Java EE 8 Overview (Japanese)
 
Another compilation method in java - AOT (Ahead of Time) compilation
Another compilation method in java - AOT (Ahead of Time) compilationAnother compilation method in java - AOT (Ahead of Time) compilation
Another compilation method in java - AOT (Ahead of Time) compilation
 
Polyglot on the JVM with Graal (English)
Polyglot on the JVM with Graal (English)Polyglot on the JVM with Graal (English)
Polyglot on the JVM with Graal (English)
 
CDI 2.0 (JSR 365) - Java Day Tokyo 2017 (English)
CDI 2.0 (JSR 365) - Java Day Tokyo 2017 (English)CDI 2.0 (JSR 365) - Java Day Tokyo 2017 (English)
CDI 2.0 (JSR 365) - Java Day Tokyo 2017 (English)
 
Polyglot on the JVM with Graal (Japanese)
Polyglot on the JVM with Graal (Japanese)Polyglot on the JVM with Graal (Japanese)
Polyglot on the JVM with Graal (Japanese)
 
Nashorn in the future (Japanese)
Nashorn in the future (Japanese)Nashorn in the future (Japanese)
Nashorn in the future (Japanese)
 
これからのNashorn
これからのNashornこれからのNashorn
これからのNashorn
 
Nashorn in the future (English)
Nashorn in the future (English)Nashorn in the future (English)
Nashorn in the future (English)
 

Último

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 

Último (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 

Nashorn : JavaScript Running on Java VM (Japanese)

  • 1. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.1 JavaScript Running On JavaVM: Nashorn NISHIKAWA, Akihiro Oracle Corporation Japan
  • 2. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.2 以下の事項は、弊社の一般的な製品の方向性に関する概要を説明するも のです。また、情報提供を唯一の目的とするものであり、いかなる契約に も組み込むことはできません。以下の事項は、マテリアルやコード、機能を 提供することをコミットメント(確約)するものではないため、購買決定を行う 際の判断材料になさらないで下さい。オラクル製品に関して記載されてい る機能の開発、リリースおよび時期については、弊社の裁量により決定さ れます。 OracleとJavaは、Oracle Corporation 及びその子会社、関連会社の米国及びその他の国における登録商標です。文中の 社名、商品名等は各社の商標または登録商標である場合があります。
  • 3. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.3 Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Agenda  Nashorn  Server Side JavaScript  Nashornの今後
  • 4. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.4 Nashorn
  • 5. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.5 Nashorn Compact1 Profileでも使えるJavaScript Engine
  • 6. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.6 Nashorn Compact1 Profileでも使えるJavaScript Engine
  • 7. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.7 登場の背景  Rhinoの置き換え – セキュリティ – パフォーマンス  InvokeDynamic (JSR-292) のProof of Concept  アトウッドの法則 Any application that can be written in JavaScript will eventually be written in JavaScript.
  • 8. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.8 Project Nashornの主なスコープ JEP 174  ECMAScript-262 Edition 5.1  javax.script (JSR 223) API  JavaとJavaScript間での相互呼び出し  新しいコマンドラインツール(jjs)の導入
  • 9. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.9 Java VM Scripting Engine (Nashorn) Scripting API (JSR-223) JavaScript codeJava code Other runtime Other APIs jjs
  • 10. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.10 $JAVA_HOME/bin/jjs $JAVA_HOME/jre/lib/ext/nashorn.jar
  • 11. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.11 ECMAScript-262 Edition 5.1に100%対応
  • 12. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.12 未実装・未サポート  ECMAScript 6 (Harmony) – Generators – 分割代入(Destructuring assignment) – const, let, ...  DOM/CSSおよびDOM/CSS関連ライブラリ – jQuery, Prototype, Dojo, …  ブラウザAPIやブラウザエミュレータ – HTML5 canvas, HTML5 audio, WebGL, WebWorkers...
  • 13. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.13 実行例
  • 14. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.14 JavaからNashorn ScriptEngineManager manager = new ScriptEngineManager(); ScriptEngine engine = manager.getEngineByName("nashorn"); engine.eval("print('hello world')"); engine.eval(new FileReader("hello.js"));
  • 15. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.15 JavaからNashorn JavaからScript functionを呼び出す engine.eval("function hello(name) { print('Hello, ' + name)}"); Invocable inv=(Invocable)engine; Object obj= inv.invokeFunction("hello","Taro");
  • 16. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.16 JavaからNashorn Script functionでInterfaceを実装する engine.eval("function run(){ print('run() called’) }"); Invocable inv =(Invocable)engine; Runnable r=inv.getInterface(Runnable.class); Thread th=new Threads(r); th.start(); th.join();
  • 17. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.17 NashornからJava print(java.lang.System.currentTimeMillis()); jjs -fx ...
  • 18. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.18 Nashorn for Scripting Scripting用途で使えるように機能追加  -scriptingオプション  Here document  Back quote  String Interpolation ...
  • 19. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.19 Nashorn Extensions
  • 20. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.20 Nashorn Extensions 今日ご紹介するのは  Java typeの参照を取得  Javaオブジェクトのプロパティアクセス  Lambda、SAM、Script関数の関係  スコープおよびコンテキスト
  • 21. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.21 Java type
  • 22. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.22 Java.type Rhinoでの表記(Nashornでも利用可) var hashmap=new java.util.HashMap(); または var HashMap=java.util.HashMap; var hashmap=new HashMap();
  • 23. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.23 Java.type Nashornで推奨する表記 var HashMap=Java.type('java.util.HashMap'); var hashmap=new HashMap();
  • 24. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.24 Java.type Class or Package? java.util.ArrayList java.util.Arraylist
  • 25. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.25 Java配列 Rhinoでの表記 var intArray= java.lang.reflect.Array.newInstance( java.lang.Integer.TYPE, 5); var Array=java.lang.reflect.Array; var intClass=java.lang.Integer.TYPE; var array=Array.newInstance(intClass, 5);
  • 26. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.26 Java配列 Nashornでの表記 var intArray=new(Java.type("int[]"))(5); var intArrayType=Java.type("int[]"); var intArray=new intArrayType(5);
  • 27. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.27 プロパティへのアクセス
  • 28. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.28 getter/setter var HashMap=Java.type('java.util.HashMap'); var map=new HashMap(); map.put('size', 2); print(map.get('size')); // 2
  • 29. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.29 プロパティ var HashMap=Java.type('java.util.HashMap'); var map=new HashMap(); map.size=3; print(map.size); // 3 print(map.size()); // 1
  • 30. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.30 連想配列 var HashMap=Java.type('java.util.HashMap'); var map=new HashMap(); map['size']=4; print(map['size']); // 4 print(map['size']()); // 1
  • 31. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.31 Lambda, SAM, and Script function
  • 32. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.32 Lambda, SAM, and Script function Script functionをLambdaオブジェクトやSAMインターフェースを実装するオブ ジェクトに自動変換 var timer=new java.util.Timer(); timer.schedule( function() { print('Tick') }, 0, 1000); java.lang.Thread.sleep(5000); timer.cancel();
  • 33. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.33 Lambda, SAM, and Script function Lambda typeのインスタンスであるオブジェクトを Script functionのように取り扱う var JFunction= Java.type('java.util.function.Function'); var obj=new JFunction() { // x->print(x*x) apply: function(x) { print(x*x) } } print(typeof obj); //function obj(9); // 81 Script functionっぽく
  • 34. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.34 Scope and Context
  • 35. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.35 Scope and Context load と loadWithNewGlobal  load – 同じグローバル・スコープにScriptをロード – ロードしたScriptにロード元のScriptと同じ名称の変数が存 在する場合、変数が衝突する可能性がある  loadWithNewGlobal – グローバル・スコープを新規作成し、そのスコープに JavaScriptをロード – ロード元に同じ名前の変数があっても衝突しない
  • 36. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.36 Scope and Context ScriptContextはBindingに紐付いた複数のスコープをサポート ScriptContext ctx=new SimpleScriptContext(); ctx.setBindings(engine.createBindings(), ScriptContext.ENGINE_SCOPE); Bindings engineScope= ctx.getBindings(ScriptContext.ENGINE_SCOPE); engineScope.put("x", "world"); engine.eval("print(x)", ctx);
  • 37. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.37 Scope and Context スコープを区切るためにJavaImporterをwithと共に利用 with(new JavaImporter(java.util, java.io)){ var map=new HashMap(); //java.util.HashMap map.put("js", "javascript"); map.put("java", "java"); print(map); .... }
  • 38. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.38 その他のNashorn Extensions  Java配列とJavaScript配列の変換 – Java.from – Java.to  Javaクラスの拡張、スーパークラス・オブジェクトの取得 – Java.extend – Java.super など
  • 39. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.39 Server Side JavaScript
  • 40. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.40 Java EE for Next Generation Applications HTML5に対応した、動的かつスケーラブルなアプリケーション提供のために WebSockets Avatar
  • 41. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.41 Webアプリケーションアーキテクチャの進化 Request-Response and Multi-page application Java EE/JVM Presentation (Servlet/JSP) Business Logic Backend ConnectivityBrowser
  • 42. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.42 Webアプリケーションアーキテクチャの進化 Ajax (JavaScript) の利用 Java EE/JVM Connectivity (REST, SSE) Presentation (Servlet/JSP, JSF) Business Logic Backend ConnectivityBrowser JavaScript
  • 43. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.43 今風のWebアプリケーションアーキテクチャ Presentationよりはむしろ接続性を重視 Java EE/JVM Connectivity (WebSocket, REST, SSE) Presentation (Servlet/JSP, JSF) Business Logic Backend ConnectivityBrowser View Controller JavaScript
  • 44. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.44 How about Node.js?
  • 45. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.45 既存サービスのモバイル対応例 Node.js JavaScript REST SSE WebSocket Browser View Controller JavaScript
  • 46. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.46 How about Node.js on JVM?
  • 47. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.47 既存サービスのモバイル対応例 NodeをJava VMで動作させよう Java EE/JVM Node Server Business Logic Backend Connectivity Client JavaScriptBrowser View Controller JavaScript
  • 48. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.48 Avatar.js
  • 49. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.49 Avatar.js  Node.jsで利用できるモジュールをほぼそのまま利用可能 – Express、async、socket.ioなど – npmで取り込んだモジュールを認識  利点 – Nodeプログラミングモデルの利用 – 既存資産、ナレッジ、ツールの活用
  • 50. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.50 Avatar.js = Node + Java Threadも含めたJavaテクノロジーを活用 JavaJavaScript com.myorg.myObj java.util.SortedSet java.lang.Thread require('async') postEvent Node App
  • 51. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.51 Avatar
  • 52. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.52 Avatar サーバーサイドJavaScriptサービスフレームワーク  REST、WebSocket、Server Sent Event (SSE) での データ送受信に特化  Node.jsのイベント駆動プログラミングモデルや プログラミングモジュールを活用  エンタープライズ機能(Java EE)との統合
  • 53. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.53 *.html *.js *.css HTTP Application Services Avatar Modules Node Modules Avatar.js Avatar Runtime Avatar Compiler Server Runtime (Java EE) JDK 8 / Nashorn Application Views REST/WebSocket/SSE Avatar (Avatar EE) 変更通知 データ
  • 54. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.54 HTTP REST/WebSocket/SSE Avatar Compiler Application Views *.html *.js *.css Application Services Avatar Modules Node Modules Avatar.js Avatar Runtime Server Runtime (Java EE) JDK 8 / Nashorn アーキテクチャ(Server) 変更通知 データ
  • 55. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.55 Avatar Service Java JavaScript HTTP Load Balancer Services Shared State Services Services 変更通知 データ
  • 56. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.56 Avatar Runtime Server Runtime (Java EE) Avatar Modules Node Modules Avatar.js *.html *.js *.css Application Services JDK 8 / Nashorn アーキテクチャ(Client) 変更通知 データ HTTP REST/WebSocket/SSE Application Views Avatar Compiler
  • 57. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.57 Avatar and Avatar.js progress steadily.
  • 58. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.58 Nashornの今後
  • 59. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.59 Nashornの今後  Bytecode Persistence (JEP 194) http://openjdk.java.net/jeps/194  Optimistic Typing  その他
  • 60. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.60 まとめ
  • 61. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.61 まとめ  Nashorn – Javaと緊密に統合 – Rhinoからの移行にあたっては表記方法が変わっている箇 所があるので注意 – 今後も性能向上、機能追加、新しい仕様に対応  Server Side JavaScript – Avatar.js、Avatarは鋭意開発中 – ぜひFeedbackを!
  • 62. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.62 Appendix
  • 63. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.63 ソースコード Shell 主としてjjsで利用 Compiler ソースからバイトコード (class) を生成 Scanner ソースからトークンを作成 Parser トークンからAST/IRを作成 IR スクリプトの要素 Codegen AST/IRからscript classのバイトコードを生成 Objects ランタイム要素 (Object、String、Number、Date、RegExp) Scripts スクリプト用のコードを含むclass Runtime ランタイムタスク処理 Linker JSR-292 (InvokeDynamic) に基づきランタイムで呼び出し先をバインド Dynalink 最適なメソッドを検索(言語間で動作)
  • 64. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.64 Nashorn Documents http://wiki.openjdk.java.net/display/Nashorn/Nashorn+Documentation  Java Platform, Standard Edition Nashorn User's Guide http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/nash orn/  Scripting for the Java Platform http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/  Oracle Java Platform, Standard Edition Java Scripting Programmer's Guide http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/prog_ guide/
  • 65. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.65 Nashorn http://openjdk.java.net/projects/nashorn/  OpenJDK wiki – Nashorn https://wiki.openjdk.java.net/display/Nashorn/Main  Mailing List nashorn-dev@openjdk.java.net  Blogs – Nashorn - JavaScript for the JVM http://blogs.oracle.com/nashorn/ – Nashorn Japan https://blogs.oracle.com/nashorn_ja/
  • 66. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.66 Avatar.js  Project Page https://avatar-js.java.net/  Mailing List users@avatar-js.java.net
  • 67. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.67 Avatar  Project Page https://avatar.java.net/  Mailing List users@avatar.java.net
  • 68. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.68
  • 69. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.69