Rafael Zuniga, Stephen Cave
Summary:
The purpose of this lab is to create a syndication feed using WCF.
Procedure:
We begin by creating a new WCF syndication project:

Generated for us are Feed1.cs and IFeed1.cs. The first file implements the interface defined in the second. We proceed by renaming Feed1.cs to ArticleService.cs, which renames the Feed1 class to ArticleService, and IFeed1.cs to IArticleService.cs, which renames the IFeed1 interface to IArticleService.cs. The implementation has a default CreateFeed() function which contains the code for returning the formatted feed. Instead of using the default syndication creation code we gut it, keeping only the section determining which format to use and the feed to return. We then modify the sections which actually return the format by putting in the code from this article and we get:
if (query == "atom")
{
formatter = GetArticleInfoAtom();
}
else
{
formatter = GetArticleInfoRss();
}
No contract modifications are needed, instead we only need to put in the actual GetArticleAtom and GetArticleInfoRss methods. We can then run the project and access the feed, in RSS and Atom format, through HTTP:


Observations:
- Creating an RSS/Atom feed is ridiculously easy
- I probably did this wrong