Avatar.js
-
Upload
alinpandichi -
Category
Technology
-
view
256 -
download
2
Transcript of Avatar.js
Avatar.js
Server-side JavaScript for the JVM
Summary:
What is Avatar.js
Avatar.js project goals
Why use Avatar.js
Status as of September 2013
Demo
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
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
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)
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
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
DEMO
Project Avatar
An end-to-end web application framework based on the thin-server architecture (TSA) designed to build modern HTML5 applications
Resources
https://avatar-js.java.net/
https://avatar.java.net
https://gist.github.com/hakobera/9802734
THANK YOU!
Q & A