Your SlideShare is downloading. ×
JRuby in a Java World
JRuby in a Java World
JRuby in a Java World
JRuby in a Java World
JRuby in a Java World
JRuby in a Java World
JRuby in a Java World
JRuby in a Java World
JRuby in a Java World
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

JRuby in a Java World


Published on

Brief overview of using JRuby in a Java shop. Covers

Brief overview of using JRuby in a Java shop. Covers

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. JRuby in a Java World Sneaking JRuby in the Backdoor by Mark Menard, Vita Rara, Inc.
  • 2. JRuby
    • JRuby is an implementation of Ruby that runs on the Java Virtual Machine.
      • Can use Java classes.
      • Supports embedding into Java applications.
      • Allows testing of Java code using Ruby tools such as:
        • RSpec
        • Cucumber
      • Support is coming for creating Java classes.
  • 3. JRuby for Java Developers
    • A dynamically typed object oriented language.
    • Supports open classes and meta-programming.
    • Terse syntax with low ceremony.
    • High developer productivity.
    • Has support for closures.
    • Is focused on developer joy.
  • 4. JRuby on Rails
    • Ruby on Rails
      • A highly productive Ruby web framework focusing on convention over configuration, and DRY (Don’t Repeat Yourself).
      • Used in many high volume Software as a Service applications.
        • Basecamp
        • Lighthouse App
      • Branching out into more consumer oriented websites.
  • 5. JRuby in a Java House
    • Prototyping
    • Testing
    • Intranet Applications
    • CRUD
    • Script Existing Java Resources
  • 6. Language per Tier
    • Use appropriate language per tier of your application.
    • We’re all polyglots!
    • Model
      • Java, Groovy++ or Scala for performance
      • Ruby, Groovy or Python for expressiveness
    • Controller
      • Use a dynamic language
    • View
      • JSP, Velocity, ERB, Groovy, Javascript
  • 7. Greenfield Development
    • JRuby on Rails runs on the JVM and can be deployed in most Java application servers.
    • Packaging is easy via Warbler gem.
    • Consider this if you have a simple proof of concept project.
  • 8. Brownfield Development
    • How many greenfields are there really?
    • Strategies
      • Script existing domain models.
      • Use as scripting language for business rules.
      • Embed Rails app in existing Java web app.
      • Use Cucumber to test existing web app.
      • Use RSpec to test existing Java code.
  • 9. Sneaking Rails in the Backdoor
    • Embed a Rails app inside an existing Java web application.
      • Add JRuby dependencies
      • Add jruby-rack handler to web.xml
      • Create Rails application in project.
      • Integrate packaging of Rails app into build process.
        • Can be in a subdirectory of /WEB-INF, or
        • Can be integrated into the / of the web application.