Java vs. Ruby on Rails

I wrote a blog post <a href="http://www.pardontheinformation.com/ 2008/09/java-vs-ruby-on-rails-it-is-dead-heat.html">Java vs. Ruby on Rails</a> that I thought you might enjoy.

1 Like

Just some thoughts:

* Controller testing

If you're using an old framework like Struts 1.2 (it was already pre-historic and a bad choice), controller testing is a mess. If you reach newer frameworks (and you don't even have to go that far, get WebWork as an example) you don't have any clutter and you can test your controllers without using tools like Cactus.

* Code convention

I think you got this wrong, maybe you're referring to "convention-over-configuration", 'cos Java, unlike Ruby, has clear code conventions defined and documented by Sun ( Oracle Java Technologies | Oracle ).

* Developer tools

Saying that Eclipse's Java tools are "slightly better" than the Ruby tools (do they still exist in Eclipse? i'm using NetBeans for Ruby and Rails coding right now). The JDT is a real IDE for Java development, fully integrated with the language and environment, the JDT even has it's own compiler, for avoid the shortcomings of the "javac" compiler, beyond that, there are hundreds of plugins to complement the JDT with deep integrations with other parts of the Java environment (like AspectJ, Spring IDE and a lot more).

Saying that this is just "slightly better" is really unbelievable, when the only thing that exists for Ruby is a broken and hard to use plugin.

* Code library complexities

RubyGems is cool and Java has no packaging system of it's own, a point for Ruby, but saying that discovering "which" Web sevices, Java and Tomcat work together is really simple, download the web services SDK, it comes with the web services package and a Tomcat configured to work with it. It couldn't be better, could it?

* New developer learning curve

Oh yeah, so you don't even need to know how to code, just get a Rails book and be done with it, right?

No Ruby learning, write ugly and bad code, you may learn while you write some piece of garbage.

* Service up-time

Java's "hot-deployment" feature is a mess and this is not an application server issue, it's a JVM issue. You will always have to restart your server, as wherever you start to use "hot-deployment", that is always some memory from the perm-gem that is never reclaimed (and some servers, like Tomcat and JBoss) are famous for it's memory leaks and broken hot-deployment feature.

* Clustering

You don't mean session clustering and EJB here, do you?

"cos session clustering is one the most evil things you can do with a web application and EJBs are, well, EJBs :wink:

* International language support

Maybe you should look for Globalize and Globalite. Or even better, try google -> rails i18n - Google Search

I'm a Ruby and Java developer (i even write some code with C# from time to time...) and i'm not here to sell one or another, but i think you should read and use the tools a litle bit more before performing those comparisions.

MaurĂ­cio Linhares wrote:

RubyGems is cool and Java has no packaging system of it's own, a point for Ruby, but saying that discovering "which" Web sevices, Java and Tomcat work together is really simple, download the web services SDK, it comes with the web services package and a Tomcat configured to work with it. It couldn't be better, could it?

I wrote this about my adventure with Tomcat:

  http://c2.com/cgi/wiki?ConfigurationHell

Why does anyone think twiddling endless is "productive"? There's an old metaphor - if I had 3 hours to chop down a tree, I'd spend 2 sharpening my ax. However, some folks think that the more strokes required to cut down the tree, the more "progress" we made.

Convention over Configuration is the way to go...

Rob Miller wrote:

I wrote a blog post <a href="http://www.pardontheinformation.com/ 2008/09/java-vs-ruby-on-rails-it-is-dead-heat.html">Java vs. Ruby on Rails</a> that I thought you might enjoy.

Just a summary criticism: You are comparing apples to oranges, and this reduces your details to generalizations, like "fruits are sweet".

Java is a language and Rails is a platform.

And the general rebuttal is Sun supports Java. Ruby has no single huge corporate backer, meaning its technology must be much higher quality. Specifically - it will have less "vendor lockin".