ruby on java luc castera [email protected]
TRANSCRIPT
JRuby JSR-223: Scripting for Java Bean Scripting Framework
Java @ work Ruby @ home
Java + Ruby
Motivation
Solutions
Option 1 Option 2 Option 3
JRubyJRuby is an 100% pure-Java implementation of Ruby
Import Mature Java Libraries into Ruby
Facilitate Ruby Deployment in Enterprise
Threads + Internalization friendly
JRuby 1.0 'almost' Ruby 1.8.x compatible
JRuby on Rails:active-record-jdbc, goldspike, glassfish-rails)
JRuby compiler to Java bytecode -> Performance!
JRuby Example
JSR-223The JSR-223 defines scripting in the Java platform. Sun's implementation of Java SE 6 includes Rhino engine for Javascript.
Other Script Engines exists for other languages such as Ruby, Python, Tcl, PHP...
You may include scripting support in your Java application for various reasons:- Sophisticated configuration options- User-defined functionality- Ease of maintenance- Skill set of users- Reuse of code modules in other languages
JSR-223
Example 1
Example 2
JillBob
JillBobDana
BSFSimilar to JSR-223
Created by IBM, then donated to Apache S.F.
http://jakarta.apache.org/bsf/
Resourceshttp://jruby.codehaus.org/
http://dist.codehaus.org/jruby/talks/
http://developers.sun.com/events/techdays/presentations/2007/TD_GEN_JavaSE_Scripting.pdf
http://headius.blogspot.com/
https://scripting.dev.java.net/
http://java.sun.com/developer/technicalArticles/J2SE/Desktop/scripting/
http://www.jrubyinside.com/
http://jcp.org/en/jsr/detail?id=223