Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Just wondering if there are any reasons why a Java developer should learn Ruby on Rails knowing that there are technologies such as Grails or (especially) Spring Roo that can be more familiar?

share|improve this question

migrated from stackoverflow.com Jan 10 '11 at 1:43

This question came from our site for professional and enthusiast programmers.

+1 for asking the same question that I have. Having worked in various web technologies in Java, I started learning Rails just for the heck of it. I don't see what gain does it have over, lets say, Wicket in Scala. –  Nishant Jan 9 '11 at 10:44
BTW, this is well answered here stackoverflow.com/questions/2840890/… :) –  Nishant Jan 9 '11 at 10:51
Also consider learning JRuby on Rails since that is immediately usable with your current knowledge. –  user1249 Jan 9 '11 at 11:03

6 Answers 6

up vote 16 down vote accepted

Here's a couple of tips:

  • RoR is a DSL for webdev, the API distilled to its most pure form. Everything makes sense and can be expressed very easy. Highly readable. I am a RoR dev and programming in any Java framework is a struggle. None of the RoR framework clones nor Ruby language clones managed to catch up. Video it's about "unique details and sensibilities and individual choices [...] individual details"
  • RoR is community driven with no commercial entity nagging (springsource?).
  • the secret is not RoR (the framework), the secret is the Ruby language.
  • integrate with JVM via JRuby (mature technology)
  • Java to Ruby is easy (both imperative, object oriented, similar syntax)

Rails for Zombies
Rails Guides
Tutorial book
Rails3 screencasts

share|improve this answer
thanks clyfe for your answer, just wondering if you tried out Roo and which kind of Java framework you tried before. Also it seems that RoR at enterprise level is failing (not very scalable), E.g. Twitter is moving to Scala (JVM based) –  sebarmeli Jan 9 '11 at 13:01
If you are a Java developer, Java codes makes sense. The only, positive thing that I see with Ruby is it's laconic scripting. Grails and Scala does the same. One positive point with Java I see it's at least 2x performance over Grails or Ruby. I like coding in Ruby but I am looking for a break through reason... and I guess there is not any. –  Nishant Jan 9 '11 at 13:02
I toyed most java and java-related web tools (Roo, Play, Spring MVC, Stripes, Grails, JEE) at some point. I am not up to date on them. RoR not being scalable is a myth. Twitter is still using RoR. The Scala migration happened only for a backend queue-message-passing-thingy component ( Starling -> Kestrel ). @Nishant Java speed gains vs Ruby are irellevant in the context of network latency (say data travel client->app->db->app->client 0.2 sec vs 0.22 sec). –  clyfe Jan 9 '11 at 14:05
@clyfe well, Ruby did have issues wrt threading and performance slideshare.net/Belighted/ruby-vs-java I love it for being terse. And, I refer Ola Bini's (JRuby) presentation when I say Ruby is 2x slower. But perhaps, you are correct, that might not be a bottleneck considering network lags. –  Nishant Jan 9 '11 at 14:17

I myself, being a heavy Java believer previously, switched to RoR 2 years ago ... I have to say it was painful (much more painful than I expected and I even had some Ruby basics and was familiar with Groovy at the time), but I think I just brought too much Java "baggage" with me ...

maybe after half year actively using Rails everyday I started getting really familiar and comfortable with the Rails way of doing things (at this time I've dealt with every layer of the framework including a lot of Rails plugins and Ruby gems).

Ruby and especially the "accent" used in Rails is beautiful, here are some of my reason I thing a Java developer should go with Rails (instead of Grails/ROO) :

  • having a real OOP language under You fingers with some awesome features (mixins, blocks, the singleton class), Ruby makes You think differently about Classes and Objects than Java or Groovy
  • conventions over configuration, I know everybody does say that, but in Rails I not only passively used this technique of minimizing configuration crap, but I even actively leverage it during programming (I know others such as Grails do CoC as well, but there's always going to be baggage as there are libraries like Hibernate underneath that need to be configured)
  • simple web development, I had previous experience mostly with JSP/JSF, the Ruby approach seemed much simpler and "right" - MVC with simple reusable templates with a lot of helpers ready to be used + all the layers fill in nicely with each other.
  • I really leveraged/understood all kinds of testing - Ruby is full of great testing libraries and I think the Ruby community did most of today's testing innovations
  • You are always in control of the code, if You hit a bug in a library You can quickly deal with it, I know it might sound crazy to be able to "monkey-patch" everything, but it really gives You control over You whole application
  • Ruby made me realize that Java has thrown developers away from system (UNIX) programming, and I do think there's some real beauty and value leveraging some of the old school tricks and Ruby does not stand in Your way like Java does !

Now I do not think RoR is perfect, I even do find some features from Java libraries missing or better, but overall the advantages are really worth it ... esp for a Java programmer. Imagine how easy it was for me, with a previous Java background, to deploy a Rails application to Tomcat or to integrate with existing Java APIs using JRuby - thus doubling my Java power :) !

I really think Ruby has made me a better programmer and I often regret Java programmers stuck to the JVM. Ruby will make You happy (after the initial struggle) and You'll discover a whole new world of programming beauty ... I promise :-) !

share|improve this answer

Learning RoR will make you a better programmer.

This is not because it's a better framework but because it is outside of your comfort zone. Learning grails is very close to using hibernate & spring in java, so while you maybe more productive quicker (being a java guy) you won't learn as much as if you really have to start from scratch learning Ruby and rails.

As for not learning RoR: if you are learning this new skill or commercial/professional reasons then I would recommend learning grails over RoR, again not because it is better but because you are much more likely to get a gig as an experienced java and grails guy than a java and RoR guy.

If you do learn spring roo please come back and let me know what it's useful for.

share|improve this answer
I'm learning Spring Roo..and it uses the same principle as Rails. You can quickly create a web app in 5 mins..not sure which complexity you can reach though –  sebarmeli Jan 9 '11 at 15:54
I looked at the 1.0 release and seriously couldn't do a thing with it, I'm guessing it's come on a long way...will have a look again. –  Gareth Davis Jan 9 '11 at 16:02

I am a Java developer and I am pretty efficient in it. I have started Rails recently. I did not find a compelling reason for Rails but I guess there were two psychological reasons behind doing so:

  • Rails bandwagon is very seductive. Just see this Ruby vs Java ad done is Mac vs PC ad style. But jokes apart, 37Signals and ThoughtWorks really made it seem like Elixir with promise of "... optimized for developers productivity and happiness...
  • Every time I meet a developer who is starting his carrier, asks why not start with Rails? They make Java sound like a bad choice that can't cope fast development.

So, I started Rails for one of my personal projects. I found out:

  • Java development is as fast and agile as Rails. If you know Java.
  • Rails does have small learning curve. A lot of things you don't really need to know. Scaffolding is the perhaps the best thing. So, it's good for starting -- you may want to dissect the stuffs later to see inner workings.
  • Roo is pretty good -- and it follows Rails ideology. I have been hearing Java is far more stable and faster than Ruby. I would prefer Roo over Rails but Roo is still to be mature.
  • Ruby is terse. And this is the only thing that I like about Rails. And, I guess, Scala is as terse. So, I would prefer "Wicket with Scala" than Rails. But I would need to learn Scala for that.
  • I am a "live-by-content-assist" guy. I like to compile stuffs before execution and like jump to methods using F3. I do not know, if there is something like this in Rails. This is a major show-off, for scripting languages.

Overall, to me, I do not see much benefit in Rails. Java is not painful for me -- except it is verbose. The frameworks like Roo and Wicket make life much simpler.

I do not see any compelling reason to switch to Rails. But YMMV. :)

share|improve this answer
I don't know, the Rails is pretty big and has lots of features. The learning curve is pretty high, but maybe not as high as say, the Spring framework and all it's crappage <cough> I mean baggage –  scottschulthess Mar 4 '12 at 19:56

Learning other languages will help you understand concepts better in your main language. Many times I've learned something new about how to do something better in Java just by playing around with PHP, C#, JavaScript, Python, or some other languages.

I would recommend you play around with Ruby if you have time, but the specific language itself probably won't be useful to you if you're using Java at work.

share|improve this answer
I think this is very generic answer. It does not say WHY or WHY-NOT a Java developer should invest his time in Rails framework. Ideally, the answer should contrast Grails or Spring Roo or Java development in general with Rails or Ruby language in general. –  Nishant Jan 9 '11 at 10:50
@Nishant - I disagree. If the question-asker's organization uses Java as the standard for application development, then based on your logic, he shouldn't even bother learning the language. He asked if there are any reasons why he should learn Ruby on Rails, and I answered the question AND gave a reason why he should learn based on his short, generic question. Oftentimes, it's not up to the individual developer to decide what language they get to use in their workplace, especially when legacy systems or established teams are involved. –  jmort253 Jan 9 '11 at 17:55

I would invest my time to study patterns, improve code design, learn architectural issues, which are probably most of times generic for all languages. It makes you better and better at development. Sometimes you need to dive deeper into your main language (e.g. I spent time investigating how JVM behaves, it helps me understand java better), it helps you also learn other languages and their ideology faster (just comparing them to your already well known language). If from this POV studying RoR can help you "notice" what you could not notice before, then this investment is valuable (e.g. you see new approach, which you can use developing with Java; you can find new directions to grow).
On the other hand, to study Ruby and then RoR to see new advantages can take time, so the question is if it is really good strategy to grow :) It depends. E.g. once I decided that it would be better to start with Italian if I want to study French, for smb. else it could be better to spend time only with French, without Italian ;)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.