The Artima Developer Community
Sponsored Link

Java Buzz Forum
Grails: Groovy on Rails

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
dion

Posts: 5028
Nickname: dion
Registered: Feb, 2003

Dion Almaer is the Editor-in-Chief for TheServerSide.com, and is an enterprise Java evangelist
Grails: Groovy on Rails Posted: Jul 4, 2005 1:41 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by dion.
Original Post: Grails: Groovy on Rails
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
Latest Java Buzz Posts
Latest Java Buzz Posts by dion
Latest Posts From techno.blog(Dion)

Advertisement

It was bound to happen. The Groovy folk have seen the boon from Ruby on Rails, and want to get in on some of that action :)

A discussion of Grails (Groovy on Rails) sparked up on the mailing list, and miracles happen... code has come out of it.

Steven Devijver put together the first 0.0001 release of this code:

A first version of Grails is available in CVS. It's located under groovy/modules/grails. Currently simple controllers are implemented together with JSP support. The MVC part is based on Spring MVC.

Build the project via "ant jar"

To start your own project with Grails set the GRAILS_HOME environment variable. Next create a directory for your project and from within this directory run this command:

ant -f ${GRAILS_HOME}/src/grails/build.xml -Dbasedir=`pwd` init

to initialize the project directory structure.

Place your controllers under the grails-app directory and your JSP's under the jsp directory. A simple controller in Grails looks like
this:

class NamesController {
@Property String namesView = "names"
@Property Closure names = {
request, response ->

return [ "names" : [ "John", "Jill", "Jack", "Jaqueline" ] ]
}
}

Then make sure to create a view.

To create a WAR for deployment run this command:

ant -f ${GRAILS_HOME}/src/grails/build.xml -Dbasedir=`pwd` war

This will create a war names grails-app.war.

When the WAR is deployed access it through this URI:

/grails-app/app/names

Obviously, this is insanely early days. It is so interesting to see how people are revisiting their way of dealing with web applications after Rails.

Read: Grails: Groovy on Rails

Topic: Unadvertised Jobs: Get The Inside Track Previous Topic   Next Topic Topic: Typical Benchmarks.... in Ruby Land

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use