A little over a week ago I decided to immerse myself with RSS information, and this script is the result.
First let me explain the concept of what an RSS feed is for. People these days generally go to many news sites to get information about different topics. They have to go to many different websites, go to that section of the website and see if there is a headline that they’re interested in.
An RSS Feed is a file from that website that can be read from something called an aggregator. An aggregator collects RSS Feeds and displays the newest headlines from each one on a single site or page. It doesn’t generally show you the entire article, but usually just a headline and a short summary. This allows you to look at all your favorite headlines from your favorite news sites, and only go to the ones that you really have an interest in. They automatically updates to the new headlines and marks the ones you read as “read” so that you can easily distinguish the new items.
Onto what I learned.
The first thing I decided to do was find out what RSS is. I went to RSS Tutorial for Content Publishers and Webmasters, and found that it wasn’t really a tutorial but more of an informative guide. I didn’t read the whole thing, but I found out one important piece of information. RSS 1.0, RSS 2.0 and Atom are completely different:
- RSS 1.0 stands for “RDF Site Summary 1.0″. It is more complex than the others but gives you more options and customizable features.
- RSS 2.0 stands for “Really Simple Syndication”. It’s focus is on simplicity and is one of the most common feed types, and probably most widely known.
- Atom came as the result of wanting a standardized format. Both of the other formats are considered “informal”, and people wanted a change. The Internet Engineering Task Force (IETF) took this project on and made Atom the “standard”.
Well, I’m building a database-driven news site. RSS is a mandatory feature, but I also don’t want to have to manually update my RSS feeds. Well, there are sites that will generate it for free for you, like Feed43. I tried this, and its a good service though a little complex to setup. The only problem with it is that the feed has a big advertisement for Feed43 on it. Even though most people would never really see the advertisement (doesn’t show up when the aggregator collects the feed), I thought it wasn’t very professional for a company to be doing something like that.
I decided to make my own generator, and I wanted it to generate it dynamically. I decided to make it create either an RSS 2.0 feed or an Atom feed. This was my logical conclusion as it seems RSS 2.0 is the most common feed on the internet while Atom is considered the “standard”, and I like to uphold standards.
I first just basically copied and replaced values of an Atom feed. I thought it was a smart idea, until I tried to validate it. The validator I’ve seen recommended and the one I ended up using is called Feed Validator (how creative). Even though I haven’t tried any other validators to compare it with, I think its one of the best validators.
Back to my point, my feed failed validation pretty badly. I then found the Atom standard specifications. It had an example as well as a lot of know-how behind everything. After an hour or two, it validated. Great! My script now dynamically created a valid Atom feed.
I then went on to RSS 2.0, and I found the specification off the bat and got it to validate pretty fast.
If you want to see them at work, this is the Atom feed and this is the RSS 2.0 feed.
The second to last thing I’m going to go over is the RSS button. You may not know it, but there is a trademarked image that is freely available under the Feed Icon Guidelines. If you want to get a basic image and manipulate it a bit, a great site is called Feed Icons. These are the “standard” images. If you want some nonstandard ones, this site has a few.
One more note on aggregators. While they are generally on web pages, there is a site, Rmail, that sends you your feed data. I haven’t tried it but it looks like a good idea.
-Kerry