• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Grails: A Quick Start Guide Question to Dave Klein

 
sanjay ramaswamy
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dave, Welcome to Java Ranch .

What is the Difference between Ruby on Rails(RoR) and Groovy on Rails(GoR)???

I have experience of working on projects in Java 2 SE 1.6 learnt Servlets and JSP but it is not really sticking on my mind and doesn't make me feel like working on them ? Should i know the servlet concepts to learn GRails ???

How does Groovy differentiate itself from Scala ? Scala which is the new in-thing with functional programming on JVM . Can you talk about the Job Potential of Learning Groovy because i do not want to waste my time on something no one is using .


Regards,
Sanjay
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sanjay Jayaram Rao wrote:

What is the Difference between Ruby on Rails(RoR) and Groovy on Rails(GoR)???


http://groovy.dzone.com/news/grails-vs-rails-my-thoughts
 
Dave Klein
author
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sanjay,

The article that Raghavan linked to is a good one in discussing some differences, however it is a bit old and many of the issues Matt Raible brings up have been addressed.

Grails may not be quite as "mature" as Rails, but the frameworks underlying it (Spring, Hibernate, Ant, etc.) are much more mature than Rails.

Grails is a JEE compliant web framework so it adheres to the Servlet spec, but you don't have to deal with Servlets at all to use Grails. An understanding of how they work can be helpful at times but is rarely needed.

Groovy is a dynamically typed (or optionally typed) object oriented language for the JVM and Scala is a statically typed functional / object hybrid language for the JVM. I don't know much about Scala other than that so I won't try to compare the languages further, but Groovy is gaining adoption at a rapid pace and is a joy to work with!

If you check on sites like indeed.com you will see that Groovy and Grails, though still a minority of the job market, are growing quickly. I have worked on Grails full time for the past two years (at three different organizations).

I hope that helps,
Dave
 
Mirco Schmidt
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dave,

grails will be a challenge for me, so I hope I am mature enough for it, what I need is looking first at the design pattern. What kind of model I can use to get relational mapping views in grails? Or is web developing the main concept of grails framework? For my projects I'd like to interact between databases and java code so maybe I'wll give it a try.
 
Dave Klein
author
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Metron,

Grails is a "full stack" framework. Which means that it will help you with the whole application, including persistence.

The easiest way to handle your relational data in a Grails application is to let Grails do it for you. Grails will use Hibernate to create your database artifacts based on your domain classes. To take advantage of this you just need to follow a simple convention.

If you have an existing database that you need to access from a Grails application you have to do a bit more work, but it's still not that difficult (usually). My preferred mechanism for mapping to an existing DB is to use Grails' mapping DSL. http://grails.org/GORM+-+Mapping+DSL. You can also use JPA annotations in your domain classes or you can create Hibernate mapping files and place them in your application's conf/hibernate directory. You can read more about these approaches here: http://grails.org/Hibernate+Integration

Have fun,
Dave
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic