Creating a Feed Syndication
Today I implemented an Rss and Atom syndication feed as a sample for my portfolio site WebDataDesigners.com. It’s a simple feed that outputs a list of ads clicked. The feed, Ads Clicked, uses data the site writes when a visitor clicks an ad in the sample ad rotator.
In this case the ad is a photo in the AdRotator sample on my site.
Before I get to deeply into my story, I’d like to offer sincere thanks to Scott Mitchell of 4GuysFromRolla.com. for his excellent article, How to Create A Syndication Feed For Your Website .
I know that there are a plethora of free or for fee sites that will generate feeds for you. But, I wanted to implement my own in the app.
Creating and consuming syndication feeds is a new skill for me. I started my process, as I usually do, with Rav Google, the developer’s oracle.
I found many articles and blogs about creating and consuming syndication feeds. Most had dates in the mid 2000′s. But, I was hoping for something in framework 3.5 technology.
In my search I found a brief reference to the .NET Framework 3.5 classes System.ServiceModel.Web and System.ServiceModel.Syndication. Then, in an article by Scott, “Syndicating and Consuming RSS 1.0 (RDF) Feeds in ASP.NET 3.5″ on 4GuysFromRoll.com he sites his article on using the framework classes.
After a few hours of work rewriting and running through the code, I had a working sample. I prefer to rewrite the code. I feel that I learn more about the code by writing it than from simply copying it. It takes time to rewrite code. But, the learning from it is invaluable. And, saves a lot of time later when I need to revise or agument the application.
All went well. The only glitch was that my application did not have references to the the System.ServiceModel class libraries. It took a few moments of thinking to find the System.ServiceModel.Web dll.
Creating this sample gave me a taste of another framework technology that I haven’t used, linq.
I’m pretty happy with MS SQL. I’ve been creating databases and their objects for 10 years now. As a result, I haven’t seen the need for linq. I found it fairly easy to create the linq data. Maybe I will try out some more linq, too.
Can you tell me how linq is better than simply writing the code in my SSMS?