InfoQ

Minibook

Getting Started with Grails

Posted by Jason Rudolph on Jan 17, 2007 01:00 AM

Community
Java
Topics
Web Frameworks,
Dynamic Languages
Tags
Grails,
Groovy


Grails is an open-source, rapid web application development framework that provides a super-productive full-stack programming model based on the Groovy scripting language and built on top of Spring, Hibernate, and other standard Java frameworks.

Ruby on Rails pioneered the innovative coupling of a powerful programming language and an opinionated framework that favors sensible defaults over complex configuration, but many organizations aren't yet ready to stray from the safety of Java or forgo their current Java investments. Grails makes it possible to achieve equivalent productivity in a Java-centric environment.

131 pages, 6"x9", ISBN 978-1-4303-0782-2

Free download, buy the print version for $19.95

If you enjoyed reading the free downloadable version, please support the author as well as future InfoQ books by purchasing the print copy for only $19.95, or: Login to download this book FREE (PDF)



Accompanying Source Code

This ZIP file includes the complete source code for all the examples in this book, with each folder containing a snapshot of the source as it exists at the end of a particular chapter: gswg_source_v1_4.zip

Table of contents

1.    INTRODUCTION
Learning by Example
The RaceTrack Application 

2.    LACING UP
Installing a JDK
Installing Grails
Installing a Database

3.    HELLO, GRAILS!   
Creating Your First Grails Application   
What’s Inside?   
Establishing Your Domain   
Taking Control  
Where’s My Data? 
Building Better Scaffolding 
Understanding URLs and Controllers 

4.    IMPROVING THE USER EXPERIENCE  
Customizing Error Messages  
Adding Warning Messages  
Implementing Confirmation Messages  
Removing Record IDs  
Formatting Data  

5.    GET DYNAMIC  
Dynamic Finders  
Build Your Own Criteria  

6.    NOT JUST FOR INTRANET APPS  
Beyond CRUD  
Implementing User Authentication   
UI Makeover: Layouts and CSS  

7.    PUTTING IT TO THE TEST 
Unit Testing  
Functional Testing 

8.    THE FINISH LINE 
Logging  
Deploying  

9.    TIPS AND TRICKS FOR MOVING FORWARD  
Defining Your Own Database Tables  
Working with a Legacy Database Schema 
ORM Troubleshooting  
Upgrading Grails

Author Bio

Jason Rudolph is an Application Architect at Railinc, where he develops software that helps keep trains moving efficiently throughout North America. He recently delivered an industry-wide inspection reporting and management system relied on for operational safety by Fortune 500 railroads, equipment leasing companies, and the Federal Railroad Administration. You can find Jason online at http://jasonrudolph.com.

About the InfoQ Enterprise Software Development Series

Books on InfoQ are intentionally short and attempt to address important, timely issues in as concise a way as possible. The book's writing is intended for the Senior Architect/team lead audience.  Ever thought of writing a book? Our series is a great way to start. InfoQ offers abnormally high royalties and also contract writing opportunities. Email books AT c4media.com for opportunities.

Exclusive Content

An Overview of the eXo Platform

Mestrallet and Grall cover the eXo platform, the Portlet 1.0 (JSR 168) and 2.0 (JSR 286) specs, eXo Web 2.0 Portal, JSR 286 Inter-portlet communication, eXo JCR and eXo Enterprise Content Management.

The Top 10 Ways to Botch Enterprise Java Application Scalability and Reliability

Purdy discusses Java scaling, performance vs scaling, rewriting frameworks, databases, bottlenecks, abstractions, disaster recovery, one-size-fits-all architecture, big JVM heaps and network failures.

Building Scalability and Achieving Performance: A Virtual Panel

Our panel of leading experts explores some of the challenges and thought processes that go into making their apps as scalable and performant as possible.

Domain-Driven Design in an Evolving Architecture

Mat Wall and Nik Silver explain how their has been using Domain-Driven Design in an evolving and Agile environment, at high traffic news site guardian.co.uk.

Avi Bryant on DabbleDB, Smalltalk and Persistence

In this interview, Avi Bryant talks about the Smalltalk web framework Seaside, DabbleDB, using Smalltalk images for persistence instead of an RDBMs, GemStone and more.

Book Review: Agile Adoption Patterns, A Roadmap to Organizational Success

With Agile adoption, context is everything: this book offers patterns and tools to help determine which practices most contribute to meeting your organization's goals.

Rob Windsor on WCF with REST, JSON and RSS

WCF is not just for SOAP based services and can be used with popular protocols like RSS, REST and JSON. Join Rob Windsor as he introduces WCF 3.5 and its new native support for non-SOAP services.

Christophe Coenraets Discusses Flex 3, AIR, and BlazeDS

Christophe Coenraets discusses Flex 3, Flex Builder, AIR, BlazeDS, Adobe and open source, integrating Flex with existing applications, and integrating RIAs with search engines and browsers.