Chapter 10. Using plugins: just add water

 

This chapter covers

  • Integrating email support
  • Taking advantage of caching
  • Migrating database structures
  • Adding full-text search

Few things in life do exactly what you want, and unsurprisingly Grails is no different. Fortunately, a wealth of Java tools and libraries are out there to help you implement almost any feature you could want. Because Grails is inherently a Java-based framework, you can use almost any Java library out there. Many of them are robust and mature, so why reinvent the wheel?

You can use Java libraries as is, but there can be big benefits to having an adapter between Grails and the library that makes it easier to use and quicker to set up. This is the purpose of the Grails plugin system. The idea is that functionality is bundled into modules that can be loaded by the framework and integrated into the system. That functionality may be full-text search, tag clouds, or a fancy new UI technology. In fact, many of the features of Grails are implemented as plugins themselves, including GORM.

You can see how the plugins relate to Grails and each other in figure 10.1. If you’re familiar with Eclipse or any of the other Java-centric IDEs, their plugin systems are analogous to Grails’s own.

Figure 10.1. The plugin architecture

10.1. Taking advantage of others’ hard work

10.2. Adding mail support

10.3. Caching for performance: making everything snappy

10.4. Database migrations: evolving a schema

10.5. Full-text search: rolling your own search

10.6. Summary and best practices

sitemap