skip to main content

TAMU Webmaster's Blog

Information and insight from the A&M Webmasters

Feeds Based Web Design

June 7th, 2010 by Erick Beck

As we have gone through the road show for the new university website project I have repeatedly stressed the fact that the new site, and indeed almost everything that we now produce, will be heavily dependent on RSS feeds.   Often, however, these discussions will gloss over what a feed is, the value of using feeds, and how the data is processed.

At its most basic, a feed is a data file that is placed online to be downloaded and processed by remote applications.  This allows your content to be displayed and used on other sites across campus, widening the exposure for your information.  In order to be read and processed by applications, feeds are formatted with a specific syntax.

There are several different feed syntaxes, including XML, RSS, Atom, JSON, and many more.  Which one you use depends mostly on the type of information you want distributed.  XML and JSON are both open ended and can contain pretty much any information you want.  RSS was developed specifically for a limited payload, primarily things like title, URL, and description.  This makes it perfect for transferring news article information.  It has, in fact, become the industry standard in this area and is the format that we have settled on for processing news articles into

So how do you process these files once they have been provided?  The widespread use of these file formats has made our life easy in this respect.  Many programming languages have functions for processing them built into the core language.  Many will also have third-party suites of classes/functions that you can include into your code and make life easier.  For example, we use the simplepie PHP code suite for processing most of our RSS feeds.  It is well documented, easy to download and install, and simple to use.  It is the same code that powers WordPress feed processing, so is a well maintained and supported package.

One caveat that we have found – never completely trust the source of the data feed.  If it is not valid syntax it often will not be properly processed by your script.  You also have to watch out for non-legal characters.  Most often these will be the curly-quotes or n-dashes, or other such characters that Microsoft products use.  You will want to create a function that you can pass the feed through to strip out these illegal characters and replace them with their proper values before continue to process and display the content from the data feed.

Creating the feed in the first place is a completely different ballgame.  If you have a good Content Management System or use a blogging platform like WordPress then RSS is built into the system and sharing feeds becomes easy.  If not, you can create your own feed fairly easily.  Just have a look at the RSS specifications, and create a program that will take your content data and write it to a file (or as an online web service response) that is formatted according to the proper RSS syntax.

Tags: , ,

Monday, June 7th, 2010 Programming
Share this article

1 Comment to Feeds Based Web Design

  1. Feed format wars aside, Dave Winer’s Really Simple Syndication is just that, really simple. Does the trick!

    I love the idea of having the webfronts feed driven. It’s a perfect abstraction for decoupling news presentation from story creation & lifecycle.

    Easy FTW

  2. Monty Dickerson on June 7th, 2010

Leave a comment