9. About JavaScript
● Javascript vs. Java <恩怨情仇>
● JavaScript 不能拿來寫大系統?
● CommonJS module system
10. RingoJS overview
● Developed by Hannes Wallnöfer (hns.github.com)
● Based on Mozilla Rhino
● Runs on JVM
● Orignal named HelmaNG
● Follow CommonJS
11. Node.js vs RingoJS
1. VM maturaty
2. Community size
3. Library base
4. Java interopability
5. Single-thread vs. Multi-thread
12. Node.js vs RingoJS
● VM optimize for browser ● Quite mature enterprise grade VM
● Young community ● Big community
● Not much library but will grow ● Lots of Java library
● No Java interoperability ● Very good Java interoperability
● Single thread ● Multi-thread
13. Rhino JavaScript Engine
● JavaScript <-> Java inter-operation
○ Access Java packages and classes
○ Working with Java objects
○ Inherit class/interface
● E4X
29. Mongodbstore
Retrieving all objects from a db:
var books = Book.all();
Retrieving an object by id:
var book = Book.get(id);
Deleting an object from the db:
book.remove();
Running a query on the database:
Book.query().equals('prop', value).select();