The Source for Java Technology Collaboration
User: Password:



Gregg Sporar

Gregg Sporar's Blog

From Java to Ruby

Posted by gsporar on July 16, 2006 at 05:24 PM | Comments (6)

As I stated last November when I reviewed his previous book, I am a fan of Bruce Tate. He writes well and delivers useful content.

His newest book is From Java To Ruby, published by The Pragmatic Bookshelf. It is a quick read (150 pages) and the price is right (about $19 from amazon.com). There are some rough spots where I wish he had provided more details to backup some of his somewhat glib statements, but in general I thought the book was worthwhile.

It is important to note what this book is not. It is not intended as a guide to learning the Ruby language or its very popular framework, Ruby On Rails (RoR). It is instead for software development managers and consultants that want guidance on how to introduce Ruby into an organization. Tate's central thesis is that Ruby can reduce development pain in certain situations. The most important piece of advice in the book is on page 17:

To be successful, you need to understand the pain in your organization and interpret it. You need to know where the pain is the most acute. Most projects don't fail for technical reasons. If you can't solve your communication problems, if you can't control scope creep, or if you can't tell what the customer actually wants, the choice of programming language is not going to matter to you. It's simply not high enough in the hierarchy of pain. Put this book down, and pick up another one. Ruby won't help; it will only introduce more risk.

In other words, if Java is not your problem, then moving away from it is not going to solve your problem. That sounds like common sense to me, but as John Reynolds recently reminded us, "common sense is not very common." Several chapters in this book contain good common sense ideas for doing project management, handling risks, etc. A good deal of the rest of the book explains why Java is broken and why Ruby is the solution.

Or I should say, for which type of applications he thinks Java is broken and Ruby is the solution. Tate is careful to point out Java's strengths as well as weaknesses and he describes situations where Java is the correct choice instead of Ruby. He also gives quite a bit space to the JRuby project in chapter 6, and provides some interesting ideas about a future environment that combines the respective strengths of Ruby and Java.

As he did in Beyond Java, in this new book he is focused on web-based applications that run on top of a relational database. This is from page 7: "The intended niche of Ruby on Rails is database-backed Internet applications. This is clearly the most important application niche, and we'll focus on this space within this book..."

Tate feels very strongly, however, that RoR is not Ruby's only advantage. In his view, dynamically typed languages like Ruby will always be more productive than statically typed languages such as Java. In addition, he is not too fond of Java's C++ like syntax and the fact that the primitive types are not objects. I am guessing that the auto-boxing feature added in Java5 was in his view too little, too late.

The guesses that I had to make were one of the disappointments I encountered while reading the book. While he is careful in some sections to back up his statements with detailed explanations and data, in other places he just tosses in comments such as (from page 26): "EJB has gotten a little better, but it's still an albatross..." I am assuming he is refering to EJB3, but he does not say. More frustrating, though, is: what specifically is it that he finds albatross-like about EJB3?

The other disappointment was the topics that were left unmentioned. One of the central ideas behind the book is to talk about the risks involved in migrating to Ruby. And yet, these topics did not get covered:

  • Migrating from one version of RoR to another. He talks about how easy it is to extend RoR (and points out you would never attempt the same amount of extension of something like Hibernate). But how do I move my application from RoR version X.Y to version X.Z? How painful will that be?
  • Once I move my application into production, how easy is it to troubleshoot problems and monitor performance? This gets only a slight mention.
  • No mention of the level of support for things like internationalization and accessibility, two areas where Java does a pretty good job.
  • If I need to host a Ruby application outside my own data center, how easy is it to get good hosting, and at what cost?

The most important topic that did not get covered, though, was what I refer to as "the anti-tipping point." Tate recognizes that Ruby could end up being the next Smalltalk, which he describes as not necessarily a bad thing. He thinks it much more likely that Ruby will instead be a huge mainstream success. What he did not provide, and what risk-averse development managers could use, is a description of the signs to watch for that indicate that he's wrong and that Ruby is in fact becoming the next Smalltalk. That way a reader of his book would be better able to react as the future unfolds.


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • That's a fair and balanced review. You ask some good questions, and I don't have answers to most of them. But you're correct in my fundamental thesis: productivity rules.

    Good point about the tipping point. I didn't address it in more detail because I thought that by the time the book was published, Ruby on Rails would already be a commercial success. I don't think there is any question that Ruby on Rails now has enough momentum to be viable for the right projects.

    All in all, this is an outstanding review that captures the spirit of the book, both strengths and weaknesses well. I'd love to see this as an Amazon review.

    Posted by: batate on July 16, 2006 at 06:47 PM

  • Gregg I just wanted to pass along that we covered your review on InfoQ.

    Posted by: scottdelap on July 17, 2006 at 08:09 AM

  • This is clearly the most important application niche - same old song repeated again and again. It should seem this way when you're a consultant in this area... I'll spend my 19$ elsewhere (is that a dollar for every 7 pages? Including the rafting stories?)

    Posted by: kirillcool on July 17, 2006 at 09:16 AM

  • Scott: Thanks for the link. I noticed, though, that on the InfoQ web site I was identified as "Greg Sporar, Sun's Chief Netbeans evangelist." Uhm, I'm just one of the grunts here - I'm not the Chief of anything. :-)

    Posted by: gsporar on July 17, 2006 at 11:25 AM

  • Kirill: I don't have a vested interest, but FWIW, the math works out to be closer to a dollar for every 8 pages. And ironically, there are no rafting or kayak stories in this book, even though there is a kayak on the cover. I enjoyed your ferret hunting story and as you pointed out, I share many of its sentiments.

    Posted by: gsporar on July 17, 2006 at 11:31 AM

  • Greetings from the JRuby project!

    A good review! Bruce talked with us quite a bit while working on it, and we're glad JRuby has gotten some good coverage there.

    FYI, the official URL for the JRuby project is now www.jruby.org instead of the old SF.net address. We have also moved to Codehaus, but the .org address will work forever.

    Posted by: headius on July 18, 2006 at 10:13 AM



Only logged in users may post comments. Login Here.


Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds