When editing a page you have the option to add it to a category. What the heck are categories anyway?

A Brief History of Categories

Categories and Topics were created a long time ago by Steven Black on FoxWiki?, where they later spread to the original wiki, and from there onto other wikis such as MeatballWiki. However, many wikis avoid them because the admins feel they clutter things up without adding much benefit.

See wiki:WikiCategories? for a quick explanation of the WikiWiki way of doing things. Essentially, one would place a tag like [CategoryDocumentation] on the bottom of a page in the "documentation" category, to serve as a marker. Then, if you wished to look for all pages in CategoryDocumentation, you would click to see that page, and then click on that page's title. Clicking on a page's title searches for pages that link to it. So, you'd find a list of all pages in the category (plus, unfortunately, any other page that happened to mention the name "CategoryDocumentation".

Other Options

The upside of the above is that you get categorization for free as a simple consequence of how wikis work. The downside is that it isn't very powerful. For example, we saw that any page mentioning a category might seem to be in the category. You actually have to look at the page itself to see if it really is in that category.

Option 1: Pages Know Their Categories

The first option is to associate the categorization with the page itself. This is just an extension of the way the original wiki did it. This might be as simple as borrowing the [CategoryDocumentation] syntax, and having built-in macros or other facilities to deal with the categories. (This is what MarkKimes has done with his modified version of 'Tavi available over on [BrainStorm].)

Or the approach might go a little farther than that and actually make categories metadata that are associated with each page in a page database. (This is what CliffordAdams suggests for future releases of UseModWiki over on meatball:PersonalCategories?.)

Option 2: Categories Know Their Pages

For the main branch of 'Tavi I have chosen to store category information in the category page, rather than the member pages. The syntax that 'Tavi uses for this is simple:

[[! PageName, OtherPage, ((some free link page)), . . . ]]

In other words, each category page contains an explicit list of pages that are members of that category. When the page is viewed, the list is displayed in a format exactly like RecentChanges.

In fact, RecentChanges is itself a category! It is the special category of all pages. There are several such special categories. They are, as follows:

[[! *]] - the category of all pages
[[! ~]] - the category of pages scheduled for deletion
[[! ?]] - the category of newly created pages (pages whose first version hasn't yet expired)

So What Does it Mean to "Add document to category"?

When you edit a 'Tavi page, you are presented with a text box that is labeled "Add document to category". What does this do?

Quite simply, it takes the page you are editing, and it places it in the given category. For example, imagine that the page ScottMoonen/Favorites contained the following:

[[! PageOne, PageTwo, CalvinAndHobbes]]

Imagine I created a new page named ZitsComic, and typed "ScottMoonen/Favorites" in the "add document to category" box. When I save the page, 'Tavi will automatically edit ScottMoonen/Favorites so that it now contains:

[[! PageOne, PageTwo, CalvinAndHobbes, ZitsComic]]

In other words, it adds ZitsComic to the ScottMoonen/Favorites category. If ScottMoonen/Favorites didn't have a category list in it, 'Tavi would create one and stick it at the end of the page:

[[! ZitsComic]]

You can enter a list of categories and 'Tavi will add the page to all of the categories. For example, I could type "ScottMoonen/Favorites CategoryComic ((Scott's Favorite Comics))" to add ZitsComic to all three of those categories.

If the page you're saving is already in a category, it won't be added to that category.

Motivation for the 'Tavi Approach

You can see part of the original discussion that sparked the idea at meatball:PersonalCategoriesDiscussion?. That will eventually be refactored, since it contains extraneous text that gets in the way of a clear description.

The principal motivation of the 'Tavi approach is as follows. First, it is recognized that, as a wiki grows, RecentChanges becomes less and less useful to track the pages that you're interested in. There becomes too much clutter. Therefore, it would be useful if people could choose groups of pages that they are interested in, and thereby build a "customized" RecentChanges for themselves.

Categories provide this means. I could set up my very own categories such as ScottMoonen/Favorites, ScottMoonen/Theology, and ScottMoonen/Physics. These would contain a list of pages that I was interested in, and I could check them instead of RecentChanges. I would also use community categories, like CategoryQuantumPhysics.

In other words, categories are more than just a set of "bookmarks". That could be done without any fancy notation at all; just list your favorite pages! Rather, they are a means of keeping track of changes to your favorite pages. So it really combines two goals into one: organize lists of pages that are centered around a common theme; and provide a means of keeping track of only those pages you're interested in.

The reason for choosing option 2 ("categories know their pages") is so that pages don't get cluttered with personal category information. Imagine if you saw text like "[ScottMoonen/Favorites] [JohnDoe/Bookmark] [SueSmith/ComputerStuff]" at the bottom of every single page. That would get cluttered. The more widespread the use of categories, the more sense it makes to structure them as lists. Of course, you can still put text like "[CategoryPhysics]" at the bottom of a page as a signal to those reading the page. This is helpful for site-wide categories, to call people's attention to their existence as a navigation tool.

Of course, this is all academic right now. I'm not aware of any 'Tavi site that has a problem with RecentChanges getting too cluttered. ;-) But if it should, hopefully TaviCategories will provide an effective way of scaling the wiki.

Future Directions for 'Tavi Categories

I'd like to create aggregate categories, or perhaps "meta" categories. In other words, let's imagine that I had the pages ScottMoonen/Favorites, ScottMoonen/Theology, and ScottMoonen/Physics. But I want to be able to see if any page in those categories has changed.

A new macro would be created to pull together all pages in other categories. For example, it might look like this:

[[@ ScottMoonen/Favorites, ScottMoonen/Theology, ScottMoonen/Physics, CategoryWorldView, CategoryEpistemology, CategorySemiotics]]

I'd stick this macro in a page like ScottMoonen/MyRecentChanges, and it would automatically display all pages in all of my preferred categories. This is the logical culmination of the motivation for categoris as a "personalized" RecentChanges.

An ETA for this feature is not yet determined, although I expect it'd be easy enough to incorporate into version 0.30.

Correct me if I am wrong, but isn't this just a simple set of Transcludes? It seems as if you are looking to do something like an automatic Transclude action similar to how the current TaviCategories work in that underneath "Add document to category" would be "Append document to node"... -- WorldMaker

---

Question: Is there a page with all categories? new categories should be included there automatically. Maybe you even can organize these categories in one or more hierarchies ? -- HardyHaardt

At present, no, there is no page with all categories; you have to do it manually; e.g. create a CategoryCategory. Same goes for a full-blown hierarchical classification system; right now, it has to be manually maintained. If you think about it, that's kinda the wiki way of doing things, anyway. Not that I wouldn't entertain any compelling ideas should any be suggested. :-) -- ScottMoonen
---

Note: Category names are expected in WordsSmashedTogether format and attempts to add a page to a category specified in all caps, all lowercase, etc. will fail silently. To avoid this problem use free links when specifying a category, e.g. my category. I have also found that one must create a category page before one can begin assigning other pages to it. -- John-Mason P. Shackelford

---

It would be really cool if the concept of categories were expanded to incorporate topic maps:

http://topicmaps.org - the specification

http://easytopicmaps.com - lots of more readable information

http://www.gca.org/papers/xmleurope2000/papers/s11-01.html The Tao of Topic Maps (an excellent read)

http://xfml.org/ - this is a simplified variation of topic maps (good for website building)

-

But, is there any way of knowing if a page already belongs to a category? Is there no way to have that information listed in the textbox when you are in edit mode? It is confusing the way it is now if you want to make sure pages are in the category they are supposed to be in... have alot of pages or alot of categories and this system uses its usefulness.


It seems that if you have a user base of any size the categories could grow out of hand. If I set a category called Frink/Favorites Others could add to this category. Okay, okay, that's not in the TrueWikiSpirit but the real world isn't quite as nice or as ordered as JavaScript?. To do true personal category you would have to allow personal pages locked by that user. (also against the WikiCodeOfGoodness?) However there should be a macro, if there isn't already, that works somewhat like a BackLink but for categories. Perhaps an adaption of the backlink that separated it's list into category and non-category pages. There should also be a way to obtain a list of categories a page has been assigned. The idea of a wiki is to stay ubiquitous and free but there must be garbage collection. My personall feeling is that if you want to maintain personal bookmarks you shouldn't use my wiki but http://del.icio.us - Frink