Download - Ruby on Java Luc Castera [email protected]
![Page 2: Ruby on Java Luc Castera luc.castera@gmail.com](https://reader036.vdocuments.us/reader036/viewer/2022082612/56649f335503460f94c50852/html5/thumbnails/2.jpg)
JRuby JSR-223: Scripting for Java Bean Scripting Framework
Java @ work Ruby @ home
Java + Ruby
Motivation
Solutions
![Page 3: Ruby on Java Luc Castera luc.castera@gmail.com](https://reader036.vdocuments.us/reader036/viewer/2022082612/56649f335503460f94c50852/html5/thumbnails/3.jpg)
Option 1 Option 2 Option 3
![Page 4: Ruby on Java Luc Castera luc.castera@gmail.com](https://reader036.vdocuments.us/reader036/viewer/2022082612/56649f335503460f94c50852/html5/thumbnails/4.jpg)
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!
![Page 5: Ruby on Java Luc Castera luc.castera@gmail.com](https://reader036.vdocuments.us/reader036/viewer/2022082612/56649f335503460f94c50852/html5/thumbnails/5.jpg)
JRuby Example
![Page 6: Ruby on Java Luc Castera luc.castera@gmail.com](https://reader036.vdocuments.us/reader036/viewer/2022082612/56649f335503460f94c50852/html5/thumbnails/6.jpg)
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
![Page 7: Ruby on Java Luc Castera luc.castera@gmail.com](https://reader036.vdocuments.us/reader036/viewer/2022082612/56649f335503460f94c50852/html5/thumbnails/7.jpg)
JSR-223
Example 1
![Page 8: Ruby on Java Luc Castera luc.castera@gmail.com](https://reader036.vdocuments.us/reader036/viewer/2022082612/56649f335503460f94c50852/html5/thumbnails/8.jpg)
Example 2
JillBob
JillBobDana
![Page 9: Ruby on Java Luc Castera luc.castera@gmail.com](https://reader036.vdocuments.us/reader036/viewer/2022082612/56649f335503460f94c50852/html5/thumbnails/9.jpg)
BSFSimilar to JSR-223
Created by IBM, then donated to Apache S.F.
http://jakarta.apache.org/bsf/
![Page 10: Ruby on Java Luc Castera luc.castera@gmail.com](https://reader036.vdocuments.us/reader036/viewer/2022082612/56649f335503460f94c50852/html5/thumbnails/10.jpg)
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