Grails Cookbook - A collection of tutorials and examples

Grails Tutorial for Beginners

Grails is a web application framework that is great to use for real projects. It is also very friendly for beginners to learn. It is contrary to the steep learning curve required for other Java based frameworks. With Grails, you can start hacking through it and be productive in a matter of hours. Ideal as starting point even for developers with no web experience.
Below is a series of tutorials prepared for newcomers to Grails. It is a step by step guide to slowly help developer in their learning process.
  • Playing with Groovy Language - Grails applictions are written in groovy language. To understand the succeeding example codes, this guide gives a brief introduction to this language.
  • Starting with Controllers - Controllers is the best starting point to learn Grails because results can be seen immediately. This guide teaches:
    • How to create a controller
    • Default routing behavior
    • Basic ways of rendering output
  • Basic Groovy Server Pages - The default rendering technology in Grails is the Groovy Server Pages (or GSP). This tutorial shows some very basic usage examples for GSPs.
  • Layout Templates - Grails supports templates to help re-factor repeating UI contents that usually pertains to the common look and feel of the application. This tutorial gives a short sample and explanation on how it works.
  • Introduction to GORM - Writing database driven business logic is easy and convenient thanks to GORM - the ORM implementation used in Grails. This tutorial will help you quickly understand how GORM works and how to use it..
  • Scaffolding - A tutorial on how to quickly create working create, read, update and delete operations (CRUD) pages for a specific table.
  • Grails Service Layer - A tutorial that discusses the importance of the service layer in Grails and how to work with it. It also explains transaction management and how to utilize it.
  • HQL Queries - HQL is fully object oriented and understands inheritance, polymorphism and association. It is very powerful where you are provided a low level API but still preserving your application to be database agnostic.
  • Criteria - An introduction to the Criteria API - an elegant way to search data from the database.