Chapter 8. Using plugins: adding Web 2.0 in 60 minutes

 

In this chapter

  • The basics of Grails plugins
  • Adding graphs and charts
  • Integrating email support
  • Adding full-text search
  • Performing a UI makeover

Few things in life do exactly what you want, and unsurprisingly Grails is no different. Fortunately, there’s a wealth of Java tools and libraries out there that will help you implement almost any feature you could want. Because Grails is inherently a Java-based framework, you can use pretty much 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 8.1. If you’re familiar with Eclipse or any of the other Java-centric IDEs, their plugin systems are analogous to Grails’ own.

Figure 8.1. The plugin architecture

8.1. Taking advantage of others’ hard work

8.2. Adding charts and graphs

8.3. Adding mail support

8.4. Full-text search: rolling your own search

8.5. GrailsUI makeover

8.6. Summary and best practices

sitemap