Sometimes I have dreams involving giant creatures resembling the “rock eater” from The Neverending Story wearing blazing badges representing various database systems (MySQL, Oracle, Informix) fighting one another. Off in the corner is a sly little archer labelled “static” that continues to pierce them with arrows as they fight one another. The giant database systems have a million tricks up their sleeves, with special weapons, and the ability to adapt as the battle changes. And all the archer has are his arrows. He’s not even a very fast running archer. Towards the end of my dreams it always seems that the archer will win the battle, but I always wake up before it ends.
Okay, maybe I don’t actually dream about this stuff (I’m not that sick), but that doesn’t mean the question still isn’t viable.
I’ve been looking heavily at Movable Type and it’s competitors recently. As far as a tool that generates static content, Movable Type wins by a long-shot. However, I’m still very reluctant to make the move. The reason for my reluctance focuses on the fact that Movable Type generates static content to be viewed as standard HTML without ever hitting a database server.
This concept, of course, has many advantages. The content only changes, at the most, 10 times a day, when I decide to update. By having the content generated to be static, every time a visitor comes to my site, no CPU time has to be wasted churning through a database to retrieve the most recent entry and cough it up for your shitty browser to do a shitty rendering job on it. However, this also means several drawbacks.
These drawbacks are enough to at least consider the fact that dynamic page generation may be worth the CPU cycles it burns. If I change my site layout, a statically generating engine must rebuild all of these pages with the new layout. Offering any kind of post security is out of the question. Tracking referrers requires hacking dynamic involvement into a page that was intended to be static in the first place. Offering “previous” and “next” links that are category specific means lots of navigation clutter, generating the same page once for each category, or just not doing it at all. Allowing a reader to browse more entries once the front page has reached its end means either forcing them into the archives, or creating several static pages allowing a user to go back further, but even then only to a predefined point. And doing something like this for categories means generating even more of this static content each time an update occurs.
At some point, the amount of CPU time required to publish a new generated static entry will exceed the amount of CPU required to serve it dynamically to visitors as they request it. Especially if you’ll only have one or two visitors a day, as I most likely will.
The amount of manipulation, customization, and enhancement you can add to a page, simply because it is dynamically generated, is certainly something to consider, but at what point does it no longer become worth it?
Take, for instance, a site like dictionary.com. This site is generated dynamically. A user asks for a word, the site looks it up in a database and generates HTML output and sends it to the browser. This site could easily be done statically (using a tool to generate the static content). As new words are added, the content will be generated once, and then served up statically from that point forward. I’m sure they get A LOT more visitors than your average weblogger could even dream of (increasing the benefits of static content), and yet they work dynamically.
In fact, most of the major resources generate their content dynamically: Yahoo News, IMDB, MSNBC. (Of course, this is purely speculation on my part as I have no real knowledge of how their internal systems work). Yet still, the major blogging software producers are churning out applications that continue to generate static content. Why is this? Are the advantages to static content that overwhelming and these big boys just don’t have a clue? Is the static content generated because that’s what the users of the software want, and if so, why do they want this?
One benefit of static content that shouldn’t be overlooked is this: a tool that does everything I want in the way that I want it in the dynamic content generation front does not currently exist, which means I’d have to write it. On the other hand, as far as static content goes, Movable Type does everything I could conceive of writing in a piece of software of my own, and therefore, I don’t have any work to do at all — just use, and enjoy.