Ruby on Rails experience of a java developer

Ruby on Rails logo

Image via Wikipedia

Although it has not been a long time since I started to develop a small rails application, I would like to share notes.

the first point ,for me and for all the Java developers like me, should be: “what kind of language is this  ???” :) yes it is not  structured and well defined like Java , there are lots of tricks going around.  Even the simple for loops seems complex.

and for such a tricky language you cannot expect to find a full-functional CTRL-SPACE support. and for me it is still a pain.

To save yourself from any more pain I would suggest you to setup your environment with instantRails and aptana radrails.

however after you get used to this alien language, you would start to enjoy it. that is what started to do.  I really understood the real meaning of light-weight and agile. Although I do feel myself as secure and powerful as in Java, I still enjoyed it.

what was missing grails?

almost a year ago I tried grails also, I have seen some sparkles in it but that wasn’t the tool I have been looking for. it was not agile, the development cycle is painful. it was a pre-configured spring-hibernate setup with groovy.

the pain of grails does come from its power actually, spring-hibernate. it is really HEAVY.

The Sparkles

I don’t have too much experience, but I can easily say, development with it is way faster than Java or grails and way powerful than PHP.if you are looking for easy way to develop a web site that is the language you should look first.  It has  good and simple web-life cycle and built in support for web standard like json,xml and ajax.

The Volcano: Java

Although rails has good point it is not as powerful as java, and it is not complete alternative to java either.(don’t hesitate  to post your comments). So for the moment I am searching for integration strategies.

Enhanced by Zemanta
Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • Wists
  • LinkedIn
  • Slashdot
  • Google Bookmarks
  • Reddit
  • StumbleUpon
  • email
  • Twitter
  • FriendFeed

Related posts:

  1. Grails, First Impressions
  2. Runtime Java Stack
  3. Grails Days 1: GORM-CRUD
  4. Is Grails too much Groovy ?
  5. Which java stack do you use ?

    • Joachim
    • July 21st, 2010

    I was having 9 years of Java experience when i started with Rails.
    I felt comfortable quick, first hating the special characters in variable names.
    (Interistingly I liked the ones in methods like the questionmark and the ‘bang’.
    Albeit Rails is not really small it is way smaller than any of the current promoted Java stacks. Two years before starting with Rails, I started with Spring and I would say that in the same time that you need to get a solid grasp on Spring you can learn Ruby and Rails up to a level where you can work seriously.
    After 2 years of Rails I evaluated Grails and I second you conclusions !
    It’s heavy. And you need to look at the underlying frameworks if your code is moving further than demo apps.
    As you said developing with it is by far not that lightweight as it is with Rails.
    I stopped looking at Grails.
    IN the meantime I had 2 bigger projects running on jruby with the usage of several java classes and that really work well. Deployment as a war file, the tool for building it, is included in the jruby package.
    Try that out !
    And have a look at sinatra / padrino to see that Ruby webdevelopment can be even more lightweight than Rails.

    Cheers
    Joachim
    Who never looked back at Java (the language)

    • Thanks Joachim,
      maybe I should mention before but another reason for ruby is , it has affordable hosting for small projects unlike java.

    • we
    • July 22nd, 2010

    i think Grails is a lot better for lots of reasons:

    1. It scales out of the box (with ecache)
    2. Groovy is a natural progression for a java developer (written by java developers for java developers)
    3. Grails apps are deployed as normal wars in standard j2ee servers
    4. Much easier to deploy to cloud solutions
    5. Spring are behind grails
    6. If you can do grails then its a small side step to learn Griffon (which is a groovy framework for Swing Desktop apps/applets – it rocks), all this gives you a brilliant toolkit as a developer
    7. Its easy to code
    8. Better tooling, Spring tool Suite/IntelliJ/Netbeans

      • cies
      • July 23rd, 2010

      grails does not nearly has the community ruby+rails has. if you see how much innovation went into rails3, ruby-1.9, jruby, and all these wonderful gems out there…

      for me the feeling the ruby community is outpacing groovy/grails is reason enough to prefer the former any day. :)

      1. It scales out of the box (with ecache)
      ruby gems do not come out of a box?

      2. Groovy is a natural progression for a java developer
      and java natural for c++ devs, and c++ for c, etc. why not try something fresh, yet with a VERY accessible syntax (a lot like groovy or python)

      3. Grails apps are deployed as normal wars in standard j2ee servers
      jruby apps too.

      4. Much easier to deploy to cloud solutions
      why? really on a cloud the java memory drain is the last thing one should opt-in for.

      5. Spring are behind grails
      ruby and rails are much more community drive then the enterprisey java, spring, grails.. true. and i think that is the main reason why ruby and rails can innovate so much faster.
      in jruby one could easily use the spring-hibernate stack with rails and ruby!

      6. If you can do grails then its a small side step to learn Griffon (which is a groovy framework for Swing Desktop apps/applets – it rocks), all this gives you a brilliant toolkit as a developer
      ruby has good bindings for several UI kits (gtk, qt, wx, etc), all native libs some like qt even use native widgets. and blazing fast. and come with nice tools, especially Qt.
      jruby can use the UI kits (+tools) from java natively!

      7. Its easy to code
      hahhahha!

      8. Better tooling, Spring tool Suite/IntelliJ/Netbeans
      i think all these ‘tools’ java coders ‘need’ is just a sign of the language being cumbersome.

      what again shouldn’t one do with a troll?

      • Regarding UI bindings in Ruby. Yes, we know that. Almost every language out there has some kind of UI binding. What Griffon offers is not just UI bidings for Swing (and JavaFX, and SWT, Pivot, GTK) but much more than that: an specialized yet extensible build system (think more than just rake + rawl); a plugin system; an application lifecycle, lightweight event bus, and some other goodies.

        Having said all this, Monkeybars is the closest thing to Griffon I haven seen in the Ruby world.

  1. Stripes/Spring could and outstanding and powerful solution for BIG projects, but for little projects in Java I choose Play! Framework, very quick and easy to learn.

    Grails is too buggy, even with a huge experience on Spring (I’m SpringSource Certified Spring Professional) is a no-no for me.

    Rails could be used in a Servlet container through JRuby on Rails so could be a good solution, and I know that some business are running their web apps in this way

  2. Hi, I also a Java developer and start working on Rails since 2008. Rails brings me a lot of innovation and fun.

    Java cause me a lot of head ache. Ex: you cannot deploy Liferay struts-portlet within glassfish , unless you write your own virtual server with custom classloader.

    • Christian
    • July 25th, 2010

    I can confirm you experiences with Grails. It seems to be very smart first, and I like the OOP approach, but sooner or later you have to handle the complexity of the underlying Java frameworks like Hibernate and Spring. I think that even Groovy is a bad language that tries to hide complexity instead of avoiding it. Groovy stack traces are horrible!

  1. No trackbacks yet.