The Hammer Pattern

by pieterh on 18 Oct 2009 14:12

I noticed that the Wikidot FAQs are a bit sparse. There's a bunch of FAQs on the main www site and a nice FAQ on the community site. But neither of these lists feel right. So I'm starting yet another project, recycling the name thanks to axelpc, and introducing a Wikidot pattern called "Hammer".

Why make a new site? There seem to be several reasons, but time will tell. First, I like typing a short name in the toolbar and jumping to a site. Second, we are building a growing constellation of microsites like that are really focussed on a single purpose. Third, the existing FAQs don't use what I consider to be modern Wikidot structures.

A "pattern" is a way of working. There is a Wikidot pattern that we've seen works really well, over and over. I'm going to give this pattern a name, it's the "Hammer" pattern. When you have a hammer, every problem looks either like a nail, or a nut. I used Hammer to make, for example, the Design section of this blog. I'll explain how the Hammer pattern works, using the FAQ as an example:

Step 1: organize your content as a category

It is tempting to create long pages. These are easier to read but they don't scale. So, think about what the main content you are making is. For the FAQ, it will be a "question" (presumably with a good answer). Now create a category for your content. This would be "question:" and a template, "question:_template".

Step 2: use per-page comments

Don't use the built-in forum module. Instead, in the category _template, add the Comments module. Hammer depends on knowledge being refined from rough commentary to refined page content. The Comments module lets you show most recent comments first, which can work in some cases. For the FAQ, we'd have a title "Discuss this FAQ" that helps visitors understand the reason for making comments.

Step 3: use autonumbering

A traditional wiki has no real structure. The Hammer pattern organizes content into a list of pages from 1 upwards, which makes them much easier to understand. Wikidot lets you autonumber the pages in a category. When we don't use autonumbering we have to try to create unique page names. I made that mistake on this blog.

Step 4: navigate from table to detail

A traditional wiki navigates using links. The Hammer pattern uses tables of pages. This is how we make custom forums work, for example. The ListPages module is an essential part of Hammer, so learn to use it. It is very powerful. Read my tutorial on writing a Page Manager, this explains how to create powerful tables.

You can sort by date, by size, by rating. In the FAQ, we'd want a table of questions, probably sorted by rating.

Step 5: use tags to create a lifecycle

Content has a life cycle. At the very least, it gets out of date, deprecated. You could go and delete old pages but there is a simpler way: use tags. Hammer uses tag names starting with underscore for this. There is a simple set of standard tags: _closed, _deleted, _open. For the FAQ we'd use just one tag, "_deleted", to identify pages that have been replaced, or no longer apply. The main table then selects pages without the _deleted tag.

Step 6: create many owners

Hammer seems to work best when there is a microsite for the specific problem, and this is how I prefer to use it. There are two reasons, I think. First, members of such a site feel they "own" it, much more than when they join a very large site like the Community wiki. Second, a small site is easier to understand, improve and manage. This lower barrier means you'll get more participation.

Step 7: use permissions wisely

The standard Hammer permissions model is:

  • Site access policy is usually "open"
  • Registered users can make comments
  • Trusted users get rapidly promoted to admin
  • Only admins can edit pages

For the FAQ, it makes sense that expert users, who already field many questions on other sites, come to the FAQ to create new question pages. Allowing anyone to create a page would create a mess and turn the site into a support forum, instead of a knowledge base.

Quick start

To make it easy, I've created a Hammer template site. You can check what it looks like on the new FAQ site and on the patterns site.

Comments: 16

Add a New Comment