You are previewing The Definitive Guide to Grails 2.

The Definitive Guide to Grails 2

Cover of The Definitive Guide to Grails 2 by Jeff Scott Brown... Published by Apress
  1. Title
  2. Dedication
  3. Contents at a Glance
  4. Contents
  5. About the Author
  6. About the Technical Reviewer
  7. Acknowledgments
  8. Chapter 1: The Essence of Grails
    1. Simplicity and Power
    2. Grails, the Platform
    3. Living in the Java Ecosystem
    4. Installing and Configuring Grails
    5. Creating Your First Application
    6. Grails Interactive Mode
    7. Summary
  9. Chapter 2: Getting Started with Grails
    1. What Is Scaffolding?
    2. Creating a Domain
    3. Introducing Dynamic Scaffolding
    4. Static Scaffolding
    5. Being Environmentally Friendly
    6. Configuring Data Sources
    7. Deploying the Application
    8. Summary
  10. Chapter 3: Understanding Domain Classes
    1. Persisting Fields to the Database
    2. Validating Domain Classes
    3. Using Custom Validators
    4. Understanding Transient Properties
    5. Customizing Your Database Mapping
    6. Building Relationships
    7. Extending Classes with Inheritance
    8. Embedding Objects
    9. Testing Domain Classes
    10. Summary
  11. Chapter 4: Understanding Controllers
    1. Defining Controllers
    2. Creating a Model
    3. Rendering a View
    4. Performing Data Binding
    5. Working with Command Objects
    6. Imposing HTTP Method Restrictions
    7. Controller IO
    8. Using Simple Interceptors
    9. Testing Controllers
    10. Controllers in Action
    11. Summary
  12. Chapter 5: Understanding Views
    1. The Basics
    2. Built-in Grails Tags
    3. Grails Dynamic Tags
    4. Summary
  13. Chapter 6: Mapping URLs
    1. Understanding the Default URL Mapping
    2. Including Static Text in a URL Mapping
    3. Removing the Controller and Action Names from the URL
    4. Embedding Parameters in a Mapping
    5. Specifying Additional Parameters
    6. Mapping to a View
    7. Applying Constraints to URL Mappings
    8. Mapping to HTTP Request Methods
    9. Mapping HTTP Response Codes
    10. Taking Advantage of Reverse URL Mapping
    11. Named URL Mappings
    12. Defining Multiple URL Mappings Classes
    13. Testing URL Mappings
    14. Summary
  14. Chapter 7: Internationalization
    1. Localizing Messages
    2. Using Parameterized Messages
    3. Using Parameterized Messages for Validation
    4. Using messageSource
    5. Summary
  15. Chapter 8: Ajax
    1. Writing Ajax Code
    2. Ajax in Action
    3. Changing Your Ajax Provider
    4. Asynchronous Form Submission
    5. Fun with Ajax Remote Linking
    6. Adding Effects and Animation
    7. Ajax-Enabled Form Fields
    8. A Note on Ajax and Performance
    9. Summary
  16. Chapter 9: GORM
    1. Persistence Basics
    2. Associations
    3. Querying
    4. Configuring GORM
    5. The Semantics of GORM
    6. Transactions in GORM
    7. Detached Objects
    8. Performance Tuning GORM
    9. Locking Strategies
    10. Events Auto Time Stamping
    11. Summary
  17. Chapter 10: Services
    1. Understanding Service Basics
    2. Services and Dependency Injection
    3. Services in Action
    4. Managing Transactions
    5. Scoping Services
    6. Testing Services
    7. Exposing Services
    8. Summary
  18. Chapter 11: Integration and Dependency Management
    1. Grails and Configuration
    2. Declaring Dependencies
    3. Understanding the Grails Build System
    4. Continuous Integration with Hudson
    5. Adding Support to Your Favorite IDE
    6. Integration with E-mail Servers
    7. Deployment
    8. Summary
  19. Chapter 12: Plug-ins
    1. Plug-in Basics
    2. Plug-ins in Action
    3. Specifying Plug-in Locations on the File System
    4. Using the Resources Plug-in
    5. Using the Database Migration Plug-in
    6. Summary
  20. Index
O'Reilly logo

CHAPTER 12

Image

Plug-ins

Up until now, you have been a consumer of the Grails plug-in system at various points throughout the book. Plug-ins are very much a cornerstone of Grails. Grails itself is basically a plug-in runtime with little knowledge beyond how to load and configure an installed set of plug-ins. Most of the core of Grails is implemented as a suite of plug-ins for this runtime.

The Grails plug-in system is very flexible—so much so that it would be quite reasonable to write an entire book on the subject. In this chapter, we aim to summarize the core concepts and demonstrate some common use cases for the plug-in system. However, the full ...

The best content for your career. Discover unlimited learning on demand for around $1/day.