-
Book Overview & Buying
-
Table Of Contents
Grails 1.1 Web Application Development
By :
Having addressed the issue of old content being hard to find, we need to add a mechanism to allow users to keep track of all the new content being added to the site. A very simple way to allow this is to create an RSS feed that users can subscribe to if they want. We saw in the last chapter how to return XML from a controller. We can reuse this approach to quickly create a simple RSS feed for the application.
There is a Grails plug-in to help with writing feeds for Grails applications. This is called the Feeds plug-in (http://grails.org/plugin/feeds) and it is built on the ROME API (https://rome.dev.java.net/). Our feed is very simple. Therefore, we can use this as an opportunity to become more familiar with Groovy builders, rather than installing another plug-in.
Whenever producing anything but the simplest XML structure, we must be sure to build the XML in a separate class to the controller class. There are two reasons for this:
Good design — encapsulating the...
Change the font size
Change margin width
Change background colour