Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are "Groovy" and "Grails" and what kinds of applications are built using them?

Tags:

grails

groovy

Nowadays I hear a lot about "Groovy on Grails" and I want to know more about it:

  • What is Groovy?
  • What is Grails?
  • What kind of applications are built using Groovy on Grails?
like image 251
Rachel Avatar asked Oct 04 '09 22:10

Rachel


2 Answers

  1. What is Groovy on Grails?

    It doesn't exist under this name anymore. It's simply called Grails now.

  2. What is Groovy?

    Originally, a dynamic language for the JVM. However, since Groovy 2.0, both static and dynamic typing are supported.

  3. What is Grails?

    Grails (previously known as "Groovy on Grails") is a programming framework based on Groovy and inspired by Ruby on Rails (there are differences, but there are lots of similarities too). Like RoR, Grails promotes "coding by convention", development best practices, and is meant to be highly productive.

  4. What kind of Applications are built using "Groovy on Grails"?

    Grails is used to build web applications that run on the JVM.

  5. What are the advantages of Groovy on Grails?

    High productivity, focusing on business instead of plumbing. (Note that I wouldn't recommend to use Grails with an existing data model. The reason behind this is that Grails encourages a top-down approach where the databases ER model arises as result of the Domain classes. If you are using a legacy database, you cannot take this approach. You must map the database to the domain classes, and probably the naming convention won't match, making necessary the use of hbm.xml Hibernate configuration files or annotations. IMO, this is not a trivial change in the workflow, it can become really cumbersome and you end up losing most of the advantages of Grails.)

  6. Why would one want to use Groovy on Grails when we have standard programming languages like C/C++, Java/J2EE, and .NET/C#?

    Because of point 5.

like image 76
Pascal Thivent Avatar answered Sep 20 '22 00:09

Pascal Thivent


Groovy is an object-oriented programming language for the Java platform. It is a dynamic language with features similar to those of Python, Ruby, Perl, and Smalltalk. It can be used as a scripting language for the Java Platform. Groovy has a Java-like syntax and works seamlessly with Java bytecode.

Other features include:

  • Easy learning curve
  • Support for domain-specific languages
  • Compact syntax
  • Support for dynamic typing
  • Powerful processing primitives
  • Ease of Web application development
  • Support for unit testing.

Grails is an open source web application framework which uses the Groovy programming language. It is intended to be a high-productivity framework by following the "coding by convention" paradigm, providing a stand-alone development environment and hiding much of the configuration detail from the developer.

Like Rails, Grails seems to be what I call "Strongly Grained". If you do things the Grails way, development is easy (and generally quite fast). The framework tends to have a preferred way of doing most things. On the other hand, if you need to go against the grain, you'll have a comparably rough time of it.

And don't say Groovy on Grails(doesn't exist), for reasons refer to this blog.

like image 35
Jainendra Avatar answered Sep 18 '22 00:09

Jainendra