28

Someone asked me to learn Grails and then they said Ruby on Rails. They almost used it interchangeably.

What is the difference between the two?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Alex Gordon
  • 57,446
  • 287
  • 670
  • 1,062
  • 3
    As a personal opinion from a Ruby on Rails convert... learn Ruby on Rails! (though really, learning either will be useful as it's the framework which is the big deal not so much the language it's based on...) – Ganesh Shankar Mar 04 '10 at 03:23

6 Answers6

21

I have worked on both Groovy on Grails and Ruby on Rails.

  1. Both are agile platforms and follow the DRY or 'don't repeat yourself' principle and conventions over configuration.
  2. Both Grails is a framework of frameworks. You can write Java or Ruby syntax code in place of Groovy syntax code it will work perfectly.
  3. In Groovy we can use Java Spring and Hibernate frameworks too.
  4. Both support scaffolding.
  5. Rails has gems and plugins but in Grails, till now, I have used only plugins.
  6. Rails framework is built in Ruby language and Grails framework is built in Groovy language.

Both are wonderful frameworks.

You can find documentaion here:

vidur punj
  • 5,019
  • 4
  • 46
  • 65
13

They are completely different technologies sharing a name pattern (e.g. Java and JavaScript). It was smart at the time to name the web framework built using Groovy "Groovy on Rails" (later asked to change its name) to get attention in a space saturated with web frameworks. One key fundamental difference (besides different programming languages) is the use of ActiveRecord in Rails versus Hibernate in Grails.

Grails embraces the convention over configuration approach first popularized by Rails.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Brian
  • 13,412
  • 10
  • 56
  • 82
  • 8
    Note that Grails also has the advantage of deploying on Apache TomCat just like any other Java Servlet, and can reuse existing Java classes, so is likely to be a more practical option in a business environment. – Emyr Mar 04 '10 at 12:13
7

Grails, formerly known as "Groovy on Rails", is a web app framework using the programming language Groovy. Ruby on Rails is very similar, but uses Ruby. (Note: I have no experience with either framework or language.)

Here is a discussion about the two. Google can provide you with many more comparisons.

Community
  • 1
  • 1
David Johnstone
  • 24,300
  • 14
  • 68
  • 71
5

Ruby on Rails is a web framework written in the Ruby language making use of the model-view-controller pattern and object-relational mapping. It has an emphasis on convention over configuration and a lack of repetitive code.

Grails is a framework for the Groovy programming language with similar goals.

Zak
  • 1,157
  • 8
  • 15
3

I haven't worked with Grails but it seems to be a framework for Groovy which is similar in nature to Ruby on Rails (except that the RoR framework is built on Ruby...)

See these Wikipedia articles for more info:

http://en.wikipedia.org/wiki/Ruby_on_Rails

http://en.wikipedia.org/wiki/Grails_%28framework%29

Ganesh Shankar
  • 4,826
  • 8
  • 43
  • 56
3

Grails uses Groovy which in turn is based on Java whereas Ruby on Rails is based on Ruby which is a scripting language.

Core Xii
  • 6,270
  • 4
  • 31
  • 42