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

JavaOne 2013: «Java and JavaScript - Shaken, No...

Viktor Gamov
September 23, 2013

JavaOne 2013: «Java and JavaScript - Shaken, Not Stirred»

There is a perception in the Java community that JavaScript is a second-league interpreted language with the main purpose of making Web pages a little prettier. But JavaScript is a powerful, flexible, dynamically typed language. And today language has been experiencing its a revival driven by the interest in HTML5. Nashorn is a modern JavaScript engine available on JVM, and it’s already included with JDK8 builds. This presentation is about building polyglot application with Java and JavaScript.

Viktor Gamov

September 23, 2013
Tweet

More Decks by Viktor Gamov

Other Decks in Programming

Transcript

  1. www.faratasystems.com // follow me : twitter.com/gamussa Java and JavaScripT— Shaken,

    Not Stirred Viktor Gamov Senior Software ENGINEER, Farata Systems Tuesday, September 24, 13
  2. Why you’re here ★JavaScript enthusiast ★you're interested in JDK8 features

    ★You're fan of James Bond series ★you're one of my friends and I asked you to come... Tuesday, September 24, 13
  3. Who is talking? ★Software engineer and consultant ★co-author and JUG

    co-lead ★professional Russian Tuesday, September 24, 13
  4. Who is talking? ★Software engineer and consultant ★co-author and JUG

    co-lead ★professional Russian ★Guy between you and beer Tuesday, September 24, 13
  5. SHELL Scripting Extend app functionality on runtime 1 2 3

    JAVASCRIPT on JVM USE cASES WEB-content generation 4 provide extension points for application Tuesday, September 24, 13
  6. JAVAScript is everywhere ★v8 and nodejs ★Rhino was here for

    years ★Here comes nashorn Tuesday, September 24, 13
  7. Ultimate invokedynamic consumer 100% pure Java implementation 100% ECMAScript 5.1

    compliant JavaScript Engine for JVM What is Nashorn? 100% compiled to bytecode, no interpreter http://www.1001ausmalbilder.de/ausmalbilder/gross/ausmalbild-nashorn-7.jpg Tuesday, September 24, 13
  8. HOW To USE NASHORN? ★ The only API is JSR-223:

    javax.scripting.* ★ Java from JavaScript and vice versa ★ Create and manipulate Java/JavaScript objects ★ Extend Java classes ★ Implement Java interfaces Tuesday, September 24, 13
  9. Restrictions ★ There ARE No browser APIs: ★ HTML5 canvas

    ★ HTML5 audio ★ WebWorkers ★ WebSockets ★ WebGL Tuesday, September 24, 13