avatar.js

12
Avatar.js Server-side JavaScript for the JVM

Upload: alinpandichi

Post on 16-Jul-2015

265 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Avatar.js

Avatar.js

Server-side JavaScript for the JVM

Page 2: Avatar.js

Summary:

What is Avatar.js

Avatar.js project goals

Why use Avatar.js

Status as of September 2013

Demo

Page 3: Avatar.js

What is Avatar.js?

An open-source project on java.net

A server-side JavaScript framework for the JVM

A combination of:– The node event-driven model, module system and APIs– Nashorn JavaScript engine (new in Java8)– Java bindings for some native node dependencies– Some additional native code– Java Platform APIs

Page 4: Avatar.js

Avatar.js project goals

A platform for JavaScript Enterprise Applications

Compatible with the node programming model (as much as possible)

– node applications should run with little or no modification on Avatar– Except for modules and apps with native code

Enable using JavaEE APIs in Avatar apps– By providing JavaScript wrappers– By providing asynchronous adapters where necessary– To not block the main JavaScript thread

Page 5: Avatar.js

Why use Avatar.js?

Can reuse Java libraries and middleware

Can take advantage of multiple cores

Can be secured using the Java security model

Can be managed using existing Java tools– VisualVM, MBeans, Flight Recorder, Mission Control

Can access Java APIs to complement node APIs– BigInteger, Date, Calendar, XML, SQL, Multicast, etc

Small enough for embedded usage (less than 2Mb)

Page 6: Avatar.js

Status – September 2013

Compatible with node v0.10.18

Most modules work– Most reuse node JavaScript sources unmodified– Some use Java APIs (buffer, fs, crypto, dns, timers, zlib)

Of 584 node unit tests in v0.10.18– 470 tests pass (80%)– Some tests (8%) are patched lightly to work with Avatar.js

Page 7: Avatar.js

Modules Status – September 2013

Modules known to work abbrev ansi async block-stream chmodr chownr colors commanderconnect debug express graceful-fs inherits ini init-package-json grunt jade lodash mime mkdirp mocha node-unit node-uuid once opener optimist osenv passport q read redis request retry rimraf ronn semver slide socket.io tar uglify-js uid-number underscore which winston

Modules that work with a small patchexpress/ejs, grunt-contrib-uglify, lockfile, vows

Modules not yet working coffee-script

Page 8: Avatar.js

DEMO

Page 9: Avatar.js

Project Avatar

An end-to-end web application framework based on the thin-server architecture (TSA) designed to build modern HTML5 applications

Page 10: Avatar.js

Resources

https://avatar-js.java.net/

https://avatar.java.net

https://gist.github.com/hakobera/9802734

Page 11: Avatar.js

THANK YOU!

Page 12: Avatar.js

Q & A