There is nothing magical about using RSS for aggregating transaction information into a single feed. However, because of the popularity of RSS, there are a number of great RSS readers that make working with the protocol particularly convenient. Additionally, since RSS feeds are typically served from a web server, there are security features that make RSS more attractive than some other delivery alternatives.
Why don’t we send the transaction details over email? Email is a convenient way to receive these notifications, however without any security your transaction information could be easily intercepted as it travels across the Internet. Unless you encrypt each email message using industrial-strength encryption such as S/MIME, your confidential information could easily be compromised. RSS on the other hand is generally consumed over HTTP, where it is easy to add SSL and HTTP authentication providing a necessary layer of security. Many RSS readers today support both SSL and various types of HTTP authentication.
This article does not touch on implementing security for your RSS feed, however there are many great resources on the Internet that talk about how to do this depending on the type of server and development technology used. Requiring that the RSS feed consumer be connecting over SSL and adding basic authentication is enough to keep your transaction information secure.
How Does it Work?
For this article we will be using ASP.NET to create our feed, though the code and components are available for nearly every major development technology including Java, PHP, Delphi, classic ASP, etc. As all /n software components keep the same interfaces across development technologies, the code in this article could very easily be recreated in ASP, Java, or PHP for example.
To begin, we are going to make an ASP.NET page to serve the transactions as a dynamic RSS feed. This way, each time the RSS consumer (feed reader) attempts to access the feed, the code in our ASPX page will execute and serve the latest OFX transaction information from the financial accounts. In some cases one might want to limit the frequency in which the transaction information is pulled from financial institutions. To do so one could use the built-in ASP.NET caching capabilities to cache the feed for some duration. Again, these kinds of enhancements are beyond the scope of this article.
Getting Started with the RSS Component
The IP*Works! RSS component is straightforward and easy to use. First, create the RSS object and populate it with some basic channel information. The channel information gives feed consumers a description of the RSS feed contents. This information is typically displayed as the channel description of your RSS feed reader.
Code Listing 1
nsoftware.IPWorks.Rss rss = new nsoftware.IPWorks.Rss();
rss.ChannelTitle = "Recent AMEX Charges";
rss.ChannelWebMaster = "[you@youremail.com]";
rss.ChannelLink = Request.Url.AbsoluteUri;
rss.ChannelDescription = "Credit Card Transactions";
rss.ChannelCopyright = string.Format("Copyright {0}, /n software", DateTime.Now.Year);
Much of the above information is not really critical to this application; however some RSS readers will not display the feed correctly without it.