BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage Guides Getting Started with Grails, Second Edition

Getting Started with Grails, Second Edition

Bookmarks

Grails is a Java- and Groovy-based web framework that is built for speed. First-time developers are amazed at how quickly you can get a page-centric MVC web site up and running thanks to the scaffolding and convention over configuration that Grails provides. Advanced web developers are often pleasantly surprised at how easy it is to leverage their existing Spring and Hibernate experience.

"Getting Started with Grails" brings you up to speed on this modern web framework. Companies as varied as LinkedIn, Wired, Tropicana, and Taco Bell are all using Grails. Are you ready to get started as well?

160 pages, 6" x 9", ISBN: 978-0-557-18321-0

Free download

Courtesy of Scott Davis, Jason Rudolph and and InfoQ.com, we're happy to offer a free version for download, to get this knowledge in as many peoples hands as possible.

 

Buy the print version for $22.95

If you enjoyed reading the free download version, please support the author and InfoQ's book series by buying the print version for only $22.95.

Table of Contents

INTRODUCTION

  • Learning by Example
  • The RaceTrack Application

INSTALLING GRAILS

  • Installing a JDK
  • Installing Grails
  • Installing a Database

CREATING A GRAILS APPLICATION

  • Creating the RaceTrack Application
  • The Grails Directory Structure
  • Domain Classes
  • Scaffolding Controllers and Views

VALIDATION

  • Customizing the Field Order
  • Adding Validation
  • Changing Error Messages
  • Creating Custom Validations
  • Testing Validations

RELATIONSHIPS

  • Creating a One-to-Many Relationship
  • Creating a Many-to-Many Relationship
  • Bootstrapping Data

DATABASES

  • GORM
  • DataSource.groovy
  • Switching to an External Database

CONTROLLERS

  • create-controller vs. generate-controller
  • Understanding URLs and Controllers
  • From Request to Controller to View
  • A Quick Look at GSPs
  • Exploring the Rest of the Controller Actions
  • Rendering Views That Don’t Match Action Namesv

GROOVY SERVER PAGES

  • Understanding GSPs
  • Understanding SiteMesh
  • Understanding Partial Templates
  • Understanding Custom TagLibs
  • Customizing the Default Templatesv

AUTHENTICATION

  • Implementing User Authentication
  • Unit Testing Controllers
  • Creating a Password Codec
  • Creating an Authorization TagLib
  • Leveraging the beforeInterceptor
  • Leveraging Filters
  • Security Plugins

PLUGINS AND SERVICES

  • Understanding Plugins
  • Installing the Searchable Plugin
  • Exploring the Searchable Plugin
  • Understanding Services
  • Adding a Search Box
  • Changing the Home Page with UrlMappings
  • Production Deployment Checklist
  • Conclusion
BT