抄自:Practical JRuby on Rails Web 2.0 Projects - Bringing Ruby on Rails to the Java Platform
Apress, 2007
Foreword by Martin Fowler
The world of web application development has been given quite the shake in the past couple of years by the rise of Ruby on Rails. Many famous names (or incessant loudmouths) who are well known in the Java world have become strong advocates of Ruby and Rails—even to the point of leaving the Java world for good.
I’ve been using Ruby for many years, and I’m a big advocate of the language. It focuses on a clear but simple syntax that I find captures my intentions much more clearly than the mainstream curly brace languages. It’s fully object oriented and has powerful language features such as closures. In particular, it offers a wide range of tools for metaprogramming and creating domain-specific languages. These features underpin Rails—making it much easier to create such an influential web framework.
Since Rails has appeared, I’ve talked to many colleagues who’ve given it a spin. These are people with track records of delivery with various Java and .NET web platforms. Overwhelmingly, what I hear is that they feel their work is significantly more effective with Rails. I don’t take statements like “50% more productive” seriously, not least because software productivity is not something we can clearly measure. Lacking that, a clear majority of qualitative approval is the strongest sign of a good technology that we are likely to find.
Thus far, most books and articles have focused on using Ruby on Rails in its original C implementation. This volume is different because it works with the same Rails on a different platform—Java. I view the JRuby effort to create a fully effective Ruby implementation on the Java JVM to be an important project both for Ruby and Java. For Ruby developers, it offers a deployment platform that is well understood, particularly in corporations. We’ve already found that doors that were once closed to Rails now open when we start talking about a Java deployment.
For the Java community, JRuby is important because it offers a chance to experience a powerful language and framework while still taking advantage of Java’s excellent libraries and the ability to work in both Ruby and Java. I see a polyglot future for the JVM, one where there is a choice of languages you can use on it—languages that can interoperate cleanly so you can choose the right language for a particular project. JRuby is an important step in this direction because it brings not only a language to the JVM, but also an important framework. This book is an important tool to understanding Rails in its new caffeinated home.