The RSS implementation was done after the administration interface was completed, because the RSS system relies on it to create the right queries to the database. RSS feed URLs are identical to the administration interface URLs, except for the RSS parameter. An example URL is shown in Example 13.
http://silvia.local/marmalade/report.php?category=%25&status=%25
&priority=%25&keyword=james&projectId=109&rss=true
Example 13 - An URL pointing to an RSS feed
If the RSS parameter is set to be true, the administration interface will output an RSS feed instead of the XHTML interface. Example 14 demonstrates how the system includes the rss.php file and stops executing if the parameter is set to be true.
// if RSS then include rss.php and exit
if ($_GET[rss] == "true"){
$rssLink = explode("/", "$_SERVER[REQUEST_URI]");
$rssLink = $systemUrl.end($rssLink);
$rssLink = htmlspecialchars($rssLink);
include("./rss.php");
exit; }
Example 14 - RSS switch code
The RSS implementation creates an RSS feed containing multiple items, one for each matching bug. Since XHTML formatting is considered valid, it is used to layout the data in tables similar to the administration interface. The basic bug item structure in an RSS feed is shown in Example 15.
item>
title><![CDATA[Bug Entry (1208) from Jimi Minimi]]>/title>
description><![CDATA[
###################################### ## # BUG DETAILS FORMATTED WITH HTML ELEMENTS # ##
]]>/description> /item>
Example 15 - Marmalade 1.0 RSS item
The RSS feed can be read by browsers, but may seem corrupted to the user. An example is shown in Image 5. The real strength of RSS feeds lie in the reader applications. These applications can interpret the feed into an organized listing of items. Screen captures of suggested RSS reader applications are shown in APPENDIX C.
Image 5 - RSS feed shown in the Safari browser
Problems encountered
Due to its simplicity, the RSS feed was graceful to implement. However, problems did arise with the suitability of reader applications. Most reader applications use a caching method to store feed items. For the Marmalade system, this was a problem since the aim was to provide the users with a live view to the database.
For example, a user wishes to receive a feed with bugs marked as open and categorized as content. Caching readers function correctly as long as no items are removed from the feed. In this case removing an item would constitute setting a bug’s status as closed. Caching readers will not recognize the removal of this item and continue to store it in the cache. To the user of the system it appears as if no bugs are being corrected.
The solution for this problem was to find reader applications that are able to function without caching the headlines. The recommended RSS reader applications for the Marmalade 1.0 system are Wildgrape NewsDesk for Microsoft Windows and Ranchero Software NetNewsWire Lite for Macintosh environments. Screen captures of the applications are shown in APPENDIX C.