Monday, March 07, 2005

How to dismantle an Atomic Blog - Database or Word Processor?

Stephen said in a comment to Ah'm no weel...


On your technical stuff, as an outsider to your field, I understand how databases can be ubiquitous and hidden. But I don't understand how a blog and a database go together. Blogs and word-processors seem to have a certain commonalty. Can you expand?

OK. It depends how you look at it. From your point of view, you are creating words, laying them down in the right order, formatting them to communicate effectively... it looks to you like you're word processing - I can see that. However, take a step back and think about the object you have created once you have written your article. As I said, with a word processor you are normally creating something to be printed (or possibly emailed) like an essay, or a letter to your Auntie Flo. What happens to the object you create for your blog is quite different.

When you create your blog article, Blogger will stick it on your front page (and eventually archive it when it gets old enough). When the permalink is clicked it will be displayed on its own. If comments are added it may pop-up in its own window. Look at it in your Dashboard view and you can edit it. If an Atom/RSS feed is enabled, then the first few lines might be sent out to news aggregators... In other words, the same object is used in a number of different ways. It is clearly the same object, because you edit it once and every different view of it will be changed. How does Blogger do that? Clearly it would be daft for Blogger to create multiple versions of the same thing that all have to be separately maintained and kept up to date. It would be much better to have a single object that is poured into the appropriate template as required (...and if you change the template, the look of your blog changes, but the content of your blog entry doesn't).

So, it is obvious to me that every Blogger entry must be a uniquely identifiable object held somewhere in the Blogger system. As well as the uniquely object, there must be other data associated with it. For example who created it, when it was created, when last updated, who is allowed to edit it, what blog is associated with it, what comments are associated with it... etc. A uniquely identifiable entity, structured collection of like information... Sounds like a database record to me.

Now I don't know exactly how Blogger does things, but if there isn't a database at its heart then I'm as daft as my dog Archie. (...And that's very daft!) If anyone with a more technical understanding of Blogger and blogs more generally can shed further light on this topic, feel free to join in.

I may have a go at a another blog post on databases... but does the above help in any way?

No comments: