9 2005 |
Then, Gracie and I got talking about what RSS is, and she indicated she'd like an aggregator on her website. Sure, I said. If I can create the RSS XML, then I can use PHP's XML reading process and decode RSS just as easy, right?
Fuck that.
Now, I'm not one to swear in this blog, but my god, could the various fragments of RSS be any more incompatible? The way dates are saved is the absolute worst, especially when sorting for recent content is important -- you can't just ignore them, like creator information. Then, the actual blog content is stored in numerous different ways. Some places use namespaces, which messes up my tagreading. Stupid me, I even decided I should add Atom RSS support -- now, if that wasn't the stupidest thing ever.
So, just from my recent ramblings, here's my decisions:
- Atom sucks. The use of attributes instead of making it the element's content is a horrible thing, especially when you end up with an empty element in the end. LINK tag, I'm pointing at you -- the URL is more important than being relegated to an attribute. Next, the date format is 'broken' from a standards point of view, even though I approve of the multiple date options. Then, you have a TITLE element, and the URL has a TITLE attribute? Which do you want us to use? There's the other useless incompatiblities...why change ITEM from standard RSS to ENTRY? It's not like you use ITEM someplace else important.
- Don't use namespaces. A simple RSS feed should not need to have namespace definitions. I believe MoveableType is the culprit of this, as well as Them.Ws Feeds. The date element was flawed like Atom is in both the them.ws and MT feeds, and the way namespaces is used breaks the other elements.
- The basics of RSS 0.92 and RSS 2.0 are close enough to be backwards-compatible for the important info; these required no debugging on my part. Thank you Livejournal, whose rss feeds (add "/data/rss" to the end of the Livejournal URL) are simple, clean, and nearly human readable all by themselves. Make is easy, and you'll attract users
- Overall, dates are the most misused things: Date elements are nonstandard, sites leave them out, and the date format isn't standard. Next is the use of tags and elements with in "content" elements - one, it affects parsing if you have a tag in your text, without a closing tag. Also, you don't know where the feed is going - don't screw up their formatting with your HTML -- strip out tags before creating the RSS feed. And, finally, don't use fancy non-ANSI/ASCII characters. By the time they're downloaded, saved someplace, then formatted for reading, they're gonna look ugly.
Why is there RSS splintering anyway? If the purpose of RSS is to distribute your blog/news content in a universally standard format that's easily readable by anyone with a reader, then just use the freakin' standard elements. If you want to create a RSS feed that fits your own purposes, then add your own elements and leave existing ones alone (LiveJournal does this nicely, too). It's a lot easier for programmers to ignore superfluous elements than to try and learn the umteen different elements that all mean the same damn thing.