I hate/love RSS
I've been doing a fair bit of internal development lately (one of my excuses for not writing articles for MSDN), and this development seems to be leaning to RSS a *lot* lately.
I love RSS
Developing for RSS is simple. Grab a bunch of RSS files. Run the fabulous Infer tool on them to generate an XML Schema. Touch up the RSS by hand. Use the xsd.exe utility to generate some classes. Touch up the generated classes. Poof! You have a ready set of classes that can read and write RSS. I've written about these in the past -- nothing exciting really. Point the classes at some RSS (0.9x or 2.0, and some 1.0 files), and you have a set of classes nice & easy to work with.
I hate RSS
Developing for RSS can be a pain in the fanny. The main reason is there is no RSS. There are RSS. 0.91, 0.92, 1.0, 2.0, many with assorted extension tags thrown in. A case in point. I'm currently working on an ASP.NET Server Control to display RSS (yes, I could have done it simply with XSLT -- been there, done that, Duncan's writing an article about it). On our team alone (MSDN Content Strategists) there are five formats for RSS -- one each for Brian, Chris, Tim and Shawn, and one used by Matt, Duncan and myself. Tim supports a number of comment tags, and dc:Date. Duncan's supports a number of comment tags, and pubDate. Brian's supports one form of comment, and pubDate. Some people put the blog entries in the description element; others in the xhtml body. Some apply the xhtml body to the body element, others don't (<xhtml:body xmlns:body=”...”> as opposed to <body xmlns=”...”>). And don't get me started on RSS 1.0 (aka RDF RSS) Parsing RSS, therefore, is an endless series of “does it have this?”
Would you like Strawberry, Vanilla, Chocolate, or Neopolitan?
As I was exercising, I realized (yes, I'm slow) that this is an excellent example of the benefit of standards bodies and specifications. Compare RSS to SOAP. RSS is a mess of “it should do this -- it's not in the spec, so I'll add it”. SOAP, while it took forever to go through the W3, is much cleaner. The efforts that SOAPBuilders did to ensure interop should be an example to all. Do whatever you want, but make certain you can talk with everyone else.
So, what to do?
There should be an effort to create a real spec. It shouldn't be just a few people proposing something, it should be driven though some body, at least once it gels. Step one should be creating a test suite, then allow people to implement and test. Be willing to change your ideas if everyone else hates it (think of poor Section 5 here). Write a real specification and schema.
Just lame thoughts from a lame brain, however I see RSS/Echo/nEcho/Atom as being a great “Push” complement to Web Services' “Pull” capabilities.
TTFN - Kent