Author: Justin Edelson and Henry Liu
Publisher: O'Reilly, 2008
Aimed at: Java programmers wanting to use Ruby
Pros: On topic with plenty of Java/JRuby interop
Reviewed by: Mike James
This book is right on topic which is becoming a rarity for any book that deals with a niche subject. So many books use the excuse to write a book about a niche and highly specialized topic to simply go over the basics of a bigger topic and then throw in a few obvious bits on the more specialized topic to attempt to justify the title.
So for example, when I opened this book I could have been greeted by a book on Ruby with a bit of Java thrown in and very little about JRuby itself - but I'm pleased to say that this isn't the case.
After a basic introduction to what JRuby is - its a version of Ruby that runs on the JVM and so can inter-work with Java - we move on to how to install and get it working complete with notes on JRuby in Eclipse and NetBeans.
Chapter Two deals with JRuby on Rails and how to install and deploy it on a range of servers. Chapter Three deals with integration with Java - which, of course, is one of the main reasons you might use JRuby rather than pure Ruby. It deals with all of the possible interoperation scenarios including running Ruby from Java and accessing Java libraries from JRuby.
Chapter Four continues the story of interoperation but from the perspective of Enterprise Java - JNDI, JMS, JavaBeans, Spring Beans, Spring MVC, Hibernate, and so on. Chapter five moves on to consider the UI and graphics in general and using the Swing and Qt library in particular.
The final three chapters round off with build tools, testing and making use of the JRuby community.
If you are looking for a book that will help you use JRuby in a Java environment then this slim volume has the advantage of being right on topic.