InfoQ

InfoQ

Minibook

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

Getting Started with Grails

Posted by Jason Rudolph on Jan 17, 2007

Sections
Development
Topics
Java ,
Dynamic Languages ,
Web Frameworks
Tags
Groovy ,
Grails


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.

Educational Content

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.

Beauty Is in the Eye of the Beholder

Alex Papadimoulis discusses ugly code, where it comes from, how to avoid it, and how to get rid of it.

Architecting Visa for Massive Scale and Continuous Innovation

John Davies examines Visa’s architecture and shows how enterprises have architected complex integrations incorporating Hadoop, memcached, Ruby on Rails, and others to deliver innovative solutions.

Max Protect: Scalability and Caching at ESPN.com

Sean Comerford unveils ESPN.com’s architecture, what components are used and why, and the current changes the website goes through.

The Seven Deadly Sins of Enterprise Agile Adoption

Are there repeated patterns of failure on Enterprise Agile Enablement efforts? Sanjiv and Arlen discuss Seven Deadly Sins to avoid when adopting Agile in an enterprise.

Questions for an Enterprise Architect

Erik Dörnenburg answers: What is Enterprise and Evolutionary Architecture?, discussing 4 issues: Turning strategy into execution, Ensuring conformance, Where do the architects sit? Buying or building?

Wrap Your SQL Head Around Riak MapReduce

Sean Cribbs explains what Map-Reduce and Riak are, why and how to use Map-Reduce with Riak, and how to convert SQL queries into their Map-Reduce equivalents.