Friday, 14th October 2011
Follow WikiJava on twitter now. @Wikijava

Groovy on Grails: a quick start

From WikiJava

Jump to: navigation, search
The author suggests:

buy this book


In this tutorial I'll show you how to write the basis for a very simple CRM in just 10 minutes.

Really.

Contents

the article

Grails is a quick-developing framework for the Java platform. It includes (almost) everything you need: a web server (called Jetty), a database (HSQLDB), Spring, Hibernate, even a Groovy version of Ant called GANT. You may develop a website with advanced features that take you beyond HTML into the world of Web Services: REST, JSON, Atom, Podcasting, and much much more. Grails uses Groovy has a particular programming language.

  • Step 1: download and setup the code

Download the code from http://grails.org/Download (you could even download the quick and pretty Windows installer)

Set GRAILS_HOME (I hope you set JAVA_HOME before, so you know how to do it).

Add GRAILS_HOME/bin to your path (as above...).

If everything is right you could give the "grails" command from your command prompt and read the Grails banner.

  • Step 2: the first application (the naked one)

Where do we start? Maybe from the command line, because Grails can build an application with just a command: grails create-app.

The parameter is the name of our application. So let's begin our CRM:

>grails create-app crm

In a few moments we are going to have a special directory tree on the disk.

  • Step 3: let's put on some dress

Grails really uses a lot the ModelViewController concept.

  • Step 4:


Comments from the users

To be notified via mail on the updates of this discussion you can login and click on watch at the top of the page


Comments on wikijava are disabled now, cause excessive spam.