Ruby vs. Java Myth #1: Project Size

This week, I abruptly switched gears from working on a green-field Ruby project to pitching in on a well-established Java project. Revisiting Java provided a good chance for me to set down in words how we at Relevance think about platform choice. This week I will be posting a series of five myths that often misinform platform choices for new projects.

Myth #1: Ruby is suitable for small projects, and Java is better for large, complex projects.

This is exactly backwards. In fact, Java is more suitable for small, well-defined projects, while Ruby is better for large, complex, open-ended projects. There are several reasons Java wins for small projects:

  • On small projects, finding the right open-source library often means you have nothing to do. Java has more libraries than anyone. Advantage: Java.
  • The budget for a small project can be blown by a few gotchas that require unexpected development effort. Java is much better known and documented than Ruby. Advantage: Java.
  • On small projects, teams don't have time or budget to acquire new skills. Most teams already know Java. Advantage: Java.

On a large project, all the factors above get reversed:

  • There is a lot of new work to be done, so language productivity matters more than having libraries to choose from. Advantage: Ruby.
  • Large projects are sure to have many gotchas, so you need maximum flexibility in responding to change. Advantage: Ruby.
  • On a large project, retraining pays for itself. Companies grossly underestimate this. A five-week(!) training course on a technology that makes a developer 10% more productive would pay for itself in about a year. Advantage: Ruby.

If the myth is so backwards, why does anybody believe it? Ruby is, at present, exceptionally good at one specific kind of small project: database-backed web applications. Ruby on Rails counteracts all of Ruby's small-project disadvantages:

  • Rails is the library you need.
  • Rails eliminates the gotchas (for small projects!)
  • Rails has a great out-of-box experience, so web developers need little retraining (for small projects!)

For web applications, Advantage: Rails.

People see the success of Rails and draw exactly the wrong conclusions. There are lots of visible, successful, small Ruby on Rails projects. There are lots of visible, successful, large Java projects. Look at these facts without broader context, and you get Myth #1.

Get In Touch