views:

2011

answers:

11
+8  Q: 

Rails or Grails?

Grails vs Rails. Which has better support? And which one is a better choice to develop medium size apps with? Most importantly which one has more plug-ins?

+1  A: 

Rails is more mainstream, but less flexible. Grails is still changing rapidly, doesn't have the same developer ecosystem, and the documentation isn't nearly as mature, but it will work in some situations Rails won't.

Hank Gay
Grails has good documentation, for me the reference guide is excelenthttp://grails.org/doc/1.0.x/
dahernan
The Grails documentation has been misleading and/or wrong on multiple occasions during my short experience with it. Also, there were no good, current books as of about 3 months ago.
Hank Gay
In my experience I only found a bug in documentation, I raised a Jira issue in the grails project, and It was fixed in 5 days.About books, Grails in Action is in progress http://blogs.bytecode.com.au/glen/2008/09/16/grails-in-action--1-3-of-the-way-there---.html.
dahernan
I don't dispute that the Grails team is actively improving the documentation, but it isn't nearly on par with Rails, yet. I've modified my comment to try to reflect that better.
Hank Gay
Saying that Rails is somehow 'less flexible' shows a lack of understanding of the Ruby ecosystem.
thenduks
Let the record reflect that this answer is probably meaningless at this point - Grails and Rails have both been moving at lightspeed since I wrote this.
Hank Gay
+8  A: 

I guess if you are a Java developer and want to have access to all the existing enterprise Java libraries and functionality... go with Grails.

Scott Anderson
+6  A: 

Rails is more mature, has more plugins, has a bigger userbase, has better documentation and support available. It can also run on JRuby giving access to Java libraries if you require.

Grails has some interesting qualities, but can't claim to be up there with rails just yet. However, if you're predominantly a Java or groovy developer you may prefer it. Otherwise though, I'd suggest using Rails for medium sized projects right now.

tomafro
+3  A: 

It depends on your skills with Ruby and/or Groovy, whether you have legacy Java systems to deal with, and where you want to deploy your applications.

I was initially thrilled with Rails. At the time, there wasn't an option of deploying on the application servers at work since work is all Java. This has changed. I couldn't abandon the Java infrastructure and applications already in place and switch to Ruby, even though I thought Rails was awesome. Grails works because we can mix and match Groovy with the existing Java solutions.

Outside of work, Ruby is easier to find hosting for at the low end of the price spectrum. Because Grails uses a lot of existing Java projects the .war files, even for a small app, tend to be large. If you have a dedicated server this isn't a problem but trying to run on shared hosting with 128 MB RAM doesn't work.

2008 is the year of Groovy and Grails books but there are still many more Rails resources available.

Based on your specific criteria, Rails may be a better framework to learn. If you have any Java knowledge, or baggage ;-), you should look at Grails.

Ed.T
+2  A: 

May I suggest Merb? It is rack-based, modular, ORM-agnostic, built for speed from ground up by Ezra Zygmuntowicz. It is starting to gain some heat now...

Marcin Gil
out of box solution.I would look at merb
Ratn Deo--Dev
+5  A: 

I say grails since there are so many java libraries out there. But I am a bit biased due to the fact that I come from a java background.

If the app isn't going to be big, either suffices - and the choice ought to depend on existing infrastructure. Say if you already have a java servlet container server running, you might as well stick with grails instead of provisioning another server for rails.

Chii
+15  A: 

One other thing worth mentioning: the design philosophy of both framework is somewhat different when it comes to the model. Grails is more "domain-oriented" while Rails is more "database-oriented".
In Rails, you essentially start by defining your tables (with field names and their specifics). Then ActiveRecord will map them to Ruby classes or models.
In Grails, it's the reverse: you start by defining your models (Groovy classes) and when you hit run, GORM (Grails ActiveRecord equivalent) will create the related database and tables (or update them). Which may also be why you don't have the concept of 'migrations' in Grails (although I think it will come in some future release).
I don't know if one is better than the other. I guess it depends on your context.

This being said, I'm still myself wondering which one to choose. As Tom was saying, if you're dependent on Java you can still go for JRuby - so Java reuse shouldn't be your sole criterion.

Rollo Tomazzi
There are at least 2 Grails plugins that perform DB migrations
Don
A: 

I have used turbogears and rails a little bit. Before using rails, I tried using grails because I was using groovy for my scripting. Grails was a difficult experience.

The groovy call stack is difficult to read for a small program, but when you add in several heavy weight frameworks a simple error can yield 100s of lines. Unlike rails the grails version that I was using didn't have tools to help me determine what was mine and what belonged to the framework.

I eventually switched to using the Google Web toolkit since I really didn't need the database.

I think Grails and Groovy hold promise, but the user experience of working with them is cumbersome at present (present being last spring).

Peter Kahn
+1  A: 

Seeing as how the guys who make Grails just got bought out by Spring source yesterday, I would say Grails.

Also, since Groovy is a superset of Java, you can dive right in just using the Java you know without having to learn Ruby. Now, you'll learn a lot of dynamic stuff too and eventually write Groovy code instead of Java code, but it lowers the barrier to entry.

Grails all the way!

hendrixski
+2  A: 

I would go with Grails since I like its approach (specify your domain classes and have Grails generate everything else) better than the Rails one (build database tables and have Rails generate everything else). If you're a Java developer, you'll also like that Java code is valid Groovy code, and a Groovy class is a Java class so the integration is seamless both ways.

Karsten Silz
A: 

As a Grails developer coming from Java, i loved it from the very first time. Now, i'm starting to dig into Rails and having problems with gem. While MySQL connection setup with Grails was pretty straightforward, i'm stil strugling to make it work with Rails. "gem install myslq" is not working, apparently because i don't have XCode intalled. If it weren't for it's memory consumption issues, i'd say Grails is perfect.