RSS Where
Listening to: Franz Ferdinand on Radio 1
Warning: This is a bit of a fragile demo (and it’s not terribly elegant
either)… and due to the very hacked nature it only appears to work on IE 6 and Firefox
(I haven’t constructed my RSS correctly so it will die in IE 7 and Safari). I will
tidy up in the next day or so.
I have been talking to a lot of people about RSS over the past few days. All these
conversations prompted me to realise (and it’s pretty obvious) that we’re sitting
on top of a world wide database already (via the RSS generated by blogs and other
applications)… All that was needed was a tiny bit of code to open the items to dynamic
queries (ok a tiny bit of code to demo the concept… probably a bit more than that
for a good query parser
). The key to it is tho think of blog as a set of tables
that look a little like:
Adam
Bosworth described this in some detail a few months ago… and that’s where the
most of the inspiration came from.
The direction that i have taken is that an RSS feed is a table of items that can have
“select” queries made against them. You already see this with categories and calendar
views, but these are pre-canned queries… my thinking was more along the lines of
being able to execute a:
select * from items where URL = www.dave5.com/blog and
category in (’eink’, ‘business’)
Like this for instance: http://www.dave5.com/rsswhere/RSSWhere.aspx?select=item&where=eink,business
Or:
select * from category
Like this for instance: http://www.dave5.com/rsswhere/RSSWhere.aspx?select=category
They are pretty meaningless queries because they are over my drivel and they are very
simple. But their importance is that I have been able to make my blog perform like
a database.
In reality these are just selects over a sub select because the source RSS is scoped
by what ever count limit I place on the items in my RSS feed. If you remove that limit
and treat a blog as a generic data store it becomes very exciting (say a product list).
UPDATE: The C# - RSSWhere.txt
(4.21 KB)
UPDATE 2: Numerous spelling corrections (*sigh*).
See also More
Blog As A Database Thoughts


