Contents


foreword
preface
acknowledgments
about this book
about the title
about the cover illustration

Part 1 Introducing Grails

Chapter 1 Grails in a hurry...
Why Grails?
Getting set up
Our sample program: a Web 2.0 QOTD
Creating the domain model
Adding UI actions
Improving the architecture
Summary and best practices
Chapter 2 The Groovy essentials
An introduction
Exploring types
Time-saving features
Expert Groovy
Summary and best practices

Part 2 Core Grails

Chapter 3 Modeling the domain
Hubbub: starting our example application
Your first domain class object
Validation: stopping garbage in and out
Defining the data model—1:1, 1:m, m:n
Summary and best practices
Chapter 4 Putting the model to work
Creating instant UIs with scaffolding
Groovy querying with dynamic finders and Query by Example
More sophisticated query options
Bootstrapping reference data
Summary and best practices
Chapter 5 Controlling application flow
Controller essentials
Services: making things robust and maintainable
Data binding
Command objects
Working with images
Intercepting requests with filters
Creating custom URL mappings
Summary and best practices
Chapter 6 Developing tasty views, forms, and layouts
Understanding the core form tags
Extending views with your own tags
Adding delicious layouts
Applying Ajax tags
Summary and best practices
Chapter 7 Building reliable applications
Why should we test software?
Unit testing
Integration testing
Functional testing
Summary and best practices

Part 3 Everyday Grails

Chapter 8 Using plugins: adding Web 2.0 in 60 minutes
Taking advantage of others’ hard work
Adding charts and graphs
Adding mail support
Full-text search: rolling your own search
GrailsUI makeover
Summary and best practices
Chapter 9 Wizards and workflow with webflows
What is a webflow?
Working with webflows
Advanced webflows
Testing webflows
Summary and best practices
Chapter 10 Don’t let strangers in—security
Why security matters
Protecting against malicious intent
Access control
Further exploration of Spring Security
Summary and best practices
Chapter 11 Remote access
Using a RESTful solution
Negotiating the representation
REST in practice
Operation-oriented remoting
Summary and best practices
Chapter 12 Understanding messaging and scheduling
A hitchhiker’s guide to messaging
Using the Grails JMS plugin
Grails scheduling
Advanced scheduling
Summary and best practices

Part 4 Advanced Grails

Chapter 13 Advanced GORM kung fu
Domain model kung fu
Caching kung fu: moving from 2 users to 2^10
Legacy integration kung fu: dealing with multiple data sources
Dealing with difficult legacy databases
Summary and best practices
Chapter 14 Spring and transactions
Spring and Grails
Using transactions with GORM
Summary and best practices
Chapter 15 Beyond compile, test, and run
The Grails build system
Build integration—not for the hobbyist
Coping with a changing data model
Summary and best practices
Chapter 16 Plugin development
Creating your first plugin
Publishing your plugin
Integrating with Grails
Summary and best practices


index