| Free tutorials for Java, Eclipse and Web programming |
Version 0.6
Copyright © 2008 - 2010 Lars Vogel
07.02.2010
| Revision History | ||
|---|---|---|
| Revision 0.1 | 15.04.2008 | Lars Vogel |
| Started writing this article | ||
| Revision 0.2 | 15.12.2008 | Lars Vogel |
| Started Todo example | ||
| Revision 0.3 | 06.01.2008 | Lars Vogel |
| Error correction | ||
| Revision 0.4 | 13.06.2009 | Lars Vogel |
| Error correction, updated to Grails 1.1.1 | ||
| Revision 0.5 | 16.06.2009 | Lars Vogel |
| Improved description | ||
| Revision 0.6 | 07.02.2010 | Lars Vogel |
| Update to Grails 1.2 | ||
Table of Contents
Grails is a web framework based on Groovy and Java which can be deployed into existing Java web servers, e.g. Tomcat or Jetty .
Grails allows to create quickly web applications; its scaffolding capabilities let you create a new project within a new minutes. Grails is based on the the "convention over configuration" idea which allows the application to auto-wires itself based on naming schemes (instead of using configuration files, e.gl XML files).
The Grails framework allows instance development without requiring any configuration. Just download Grails and you are ready to start. Grails accomplish this by automatically providing the Tomcat webcontainer and the HSQLDB database during development. If you deploy you Grails application later you can use another webcontainer or database.
Grails uses GORM (Grails Object Relational Mapping) for the persistence of the domain model. GORM is based on Hibernate. You can test with the HSQLDB and run in production against another database simply by changing the configuration file (DataSource.groovy).
Grails uses JavaEE as the architectural basis and Spring for structuring the application via dependency injection.
Grails is plugin based and provides its own build system (Gant). The Grails homepage provides several pre-defined plugins which extend the Grails framework.
During the start of a new development with Grails you mainly use the command line to generated new user interfaces.
Grails is based on the programming language Groovy .
Groovy is (almost) a superset of Java, e.g. most valid Java constructs are also valid Groovy constructs. Groovy has several advanced features in additonal to the standard Java features, e.g. closures, native support for lists and maps, a shorter syntax and much more. Please see Groovy Tutorial in case you want to get to know Groovy.