Rails and Grails are both excellent frameworks with their current releases. You really can’t go wrong with either. Here are some things I find interesting about them though:
Rails
- Rails (Ruby) does not scale as well as Grails (Groovy). You will need more horsepower to run your application. This isn’t a big deal at all with PaaS options like EngineYard (and hopefully a AWS BeanStalk Rails option in the future), but it might just cost a little more to run a Rails app vs a Grails app (obviously JRuby is also an option to though).
- Rails is slightly better with NoSQL alternatives currently, but Grails is catching up quickly
- Rails has many more plugins, but this can lead to trouble if you use some that aren’t maintained (a lot of them don’t currently work with Rails 3 yet either).
- Rails is more mature and has more features at this point in time because it’s been around longer
- Rails REST support is amazing
- There are many more “big” Rails websites than Grails
- Ruby is much more popular than Groovy – TIOBE
- No dependence on Oracle, ha! (Grails obviously needs the JVM)
Grails
- Grails integrates with the JVM better than JRuby
- Grails GORM is better than ActiveRecord (IMHO), although Rails 3 opened the door a little bit for other persistence options, but all the books, tutorials, etc all use ActiveRecord
- Grails View taglibs are better than <=%…%> in view
- Grails plugins are well documented and clearly state whether they are supported by SpringSource or not
- SpringSource is investing heavily in Grails
- There will be many more corporate jobs for Grails than Rails in the future, but more startups use Rails (where do you want to work?)
My perspective
- I used Rails a couple years ago, I’m working on a Grails project now
- I like them both better than Django (Python) or Zend Framework (PHP)
- I plan to learn Lift (Scala) next
My Recommendation
- If you have never done Java development and are working on a side project for a small to medium website, go with Rails
- If you are working at a big company that uses Java, try pitching Grails to your management as the “next Java framework” they should invest in
- If you are working on “the next twitter or foursquare,” well then you are smart enough to answer this question yourself! 🙂