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

The Rhinoceros on the Loose

The Rhinoceros on the Loose

JavaScript is a powerful, flexible, and dynamically typed language. JVM is proven to be reliable and stable production platform. The power of the JVM is an ability to run programs written in different languages, including JavaScript. You can short the development cycle by leveraging a scripting abilities of JavaScript. This presentation is about the emerging opensource frameworks that allow to mix Java and JavaScript in the same application.

In this session you'll get introduced to the latest state of the polyglot frameworks that use JavaScript and Java side-by-side. We'll discuss the following topics:

* The Nashorn benefits for the server and the client side developers.
* Using JavaScript and NodeJS libraries on the Java platform.
* Real-world projects overview that leveraging on Java-JavaScript interactions, including Avatar, Vertx and others.

Viktor Gamov

October 02, 2014
Tweet

More Decks by Viktor Gamov

Other Decks in Programming

Transcript

  1. www.faratasystems.com // follow me : twitter.com/gamussa Rhinoceros on the Loose

    Viktor Gamov Senior Software ENGINEER, Farata Systems Javaone, San Francisco, CA 2014 Applied Real-World Projects with Java and JavaScript
  2. String[] options =
 new String[] {
 "--persistent-code-cache",
 "--class-cache-size=50",
 “—no-java"}; *

    
 NashornScriptEngineFactory factory = new NashornScriptEngineFactory();
 NashornScriptEngine engine =
 (NashornScriptEngine) factory.getScriptEngine(options); 
 engine.eval("Number.prototype[3] = 'javaone'; print(3[3]);"); * jjs -xhelp http://cr.openjdk.java.net/~sundar/jdk.nashorn.api/8u40/javadoc/jdk/nashorn/api/scripting/NashornScriptEngineFactory.html
  3. ★polyglot platform ★Develop with Java, Javascript, jRuby, Groovy, jython, closure,

    ★Scala, php, ceylon ★integration with nashorn ★https://github.com/vert-x/mod-lang-nashorn ★Event bus (down to the browser) ★Distributed data (in v.3) ★Open source: EPL / Apache vertx.io
  4. Avatar 2.0 ★polyglot platform (sort oF) ★integration with nashorn ★Node

    api ★Model-Store api ★Event bus ★Distributed data ★not open yet
  5. ★NODE api for Java platform ★USES DYNJS - ALTERNATIVE JAVASCRIPT

    ENGINE ★WILL BE INTEGRATED WITH VERTX nodyn
  6. Scalable JavaScript Applications with Project Nashorn [CON6423] Project Avatar: Server-Side

    JavaScript on the JVM [CON5675] 1 2 3 javaone 2014 taks to catch up Project Avatar: More Than Just Node.js on the JVM—Java EE Written in JavaScript [CON4091] 4 Toward Native JavaScript Performance on the JVM [CON4679]