Ruby On Java

2,171 views
2,092 views

Published on

Making Ruby work with Java
August 11, 2007
Barcamp, Washington DC

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,171
On SlideShare
0
From Embeds
0
Number of Embeds
73
Actions
Shares
0
Downloads
104
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Ruby On Java

  1. 1. Ruby on Java <ul><ul><li>Luc Castera </li></ul></ul><ul><ul><li>http://dambalah.com </li></ul></ul><ul><ul><li>[email_address] </li></ul></ul>
  2. 2. <ul><li>JRuby </li></ul><ul><li>JSR-223: Scripting for Java </li></ul><ul><li>Bean Scripting Framework </li></ul>Java @ work Ruby @ home Java + Ruby Motivation Solutions
  3. 3. Option 1 Option 2 Option 3
  4. 4. JRuby JRuby 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!
  5. 5. JRuby Example
  6. 6. JSR-223 <ul><li>The JSR-223 defines scripting in the Java platform. Sun's implementation of Java SE 6 includes Rhino engine for Javascript. </li></ul><ul><li>Other Script Engines exists for other languages such as Ruby, Python, Tcl, PHP... </li></ul><ul><ul><li>You may include scripting support in your Java application for various reasons: </li></ul></ul><ul><ul><li>- Sophisticated configuration options </li></ul></ul><ul><ul><li>- User-defined functionality </li></ul></ul><ul><ul><li>- Ease of maintenance </li></ul></ul><ul><ul><li>- Skill set of users </li></ul></ul><ul><ul><li>- Reuse of code modules in other languages </li></ul></ul>
  7. 7. JSR-223 Example 1
  8. 8. Example 2 Jill Bob Jill Bob Dana
  9. 9. BSF Similar to JSR-223 Created by IBM, then donated to Apache S.F. http://jakarta.apache.org/bsf/
  10. 10. Resources http://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

×