For example, I am constructing my own simple TW task manager. I
started with tiddlers that are tasks, tagged with "action". Other
tiddlers are projects, which are sets of related and sometimes ordered
tasks, tagged with "project". A task tiddler can also be tagged with
the name of a project to which it belongs, and/or also with the names
of any other tasks on which it depends.
The problem is that for a given task, there could be multiple tags,
one of which is the project to which it belongs, and the others are
other tasks on which it depends. To distinguish whether a given tag
of a task tiddler refers to a project or another task requires looking
up that tag's parent tiddler to determine whether it itself is tagged
with either "task" or "project".
I am wondering whether there is a simpler way, or whether it would
just be more efficient to use custom fields, such as
"belongsToProject", and "dependsOnTasks". Another option is to record
this information in slices.
This question generalizes to how best to annotate tiddlers with
semantic tags which encode relationships, such as "isParentOf",
"isChildOf", "hasIngredient", "isMemberOf", etc., etc., etc. I like
the simplicity and transparency of using just plain vanilla tags, but
I think they are not powerful enough.
I am interested in others' opinions and experiences.
My personal conclusion:
Tags are quick, easy and usable for most things when you just need a
quick way to make structure data - and you'll have the advantage of
using a tiddlers full capacity (wysiwyg, quick edit etc etc etc) as
the containers for whatever the information is...
Custom fields aren't just as accesible, but offer the advantage of
being able to hold several lines of text...
Data fields are accessible from the ViewMode - oneliners, fills your
TW with a lot of (unneccesary?) text ...
Slices are oneliners - but very accessible if you use a plugin as
Eric's (TiddlyTools) GridPlugin http://www.tiddlytools.com/#GridPlugin,
you are able to edit them inline!!
I know there are a lot of different opinions regarding what is the
best way of structuring data in a TW, and I believe there are
better(more elegant) ways to explain pro and cons - however I find
that I use all of them in most of my TWs solving different purposes.
If I have a nice EditTemplate, which uses custom fields - then I use
fields. Has someone made a nice taggersolutionm, I will grab that and
try to use it as much as I possibly can... etc ...
I hope my 2 cents can help you decide what is best for your case...
regards Måns Mårtensson
Fields are obscure in the current TW set up, so I've tended to avoid
them.
I'm guessing that the <data> plugin was introduced before sections &
slices were added to the TW world. I would fault the lack of TW
documentation for not introducing any of these features to the new
user.
Slices and sections are a convenient, natural way to enter tiddler-
specific data. You don't need to modify your tiddler template (though
you can) or get extra plugins for manipulating them (though you can).
Slices are single lines of information. Sections can be whole
paragraphs or documents. They can be accessed using the <<tiddler>>
transclusion if you get Eric Shulman's WikifyPlugin. (I've added a
patch to the plugin I use to access sections as well) Sections and
fields can be hidden by /%...%/ if you don't want information
cluttering up the tiddler display.
Mark
The idea of keeping the project a task belongs to and its dependencies
on other tasks in two different slices. But how then can one modify
the values of the slices in a *controlled* way, ie. a dropdown of
available projects with an option to create a new project, or a
dropdown of other tasks, without just editing the tiddler and free
texting everything?
I think tags are ideal for "attributes" of tiddlers. To use them for
relationships, other than the simplest and most generic of
relationships, is stretching their functionality, unless you
supplement with your own code to disambiguate the type of
relationship. I think what is missing from TW is semantic tagging. Are
there any plans for a "semantic TiddlyWiki", just as Semantic
Mediawiki (http://semantic-mediawiki.org) extended vanilla Mediawiki?
As I mentioned - Eric's GridPlugin is very good - Chrck it out..
Regards Måns Mårtensson
Mark
Thank you. If I am interpreting correctly, GridPlugin is a good way to
display and *free-text* edit slices of *multiple* tiddlers at a time.
I would like to display and *dropdown* edit slices of a *single* (ex.
the current) tiddler. I think I will have to create a unique
EditTemplate for taska that utilizes ListBoxPlugin.
Very interesting! I see it from the other end - attributes are one
type of relationship, which I define as triads of ["source",
"relationship type", "target"] - ex. ["George H Bush" "isTheFatherOf",
"George W Bush"]. Tags are really dyads, or at least triads where the
relationship type is fixed and implied, "hasAttribute". To bring it
back to my original problem of task management, if I have a tiddler
"A" with tags "task", "B", and "C", the only way to infer that "A"
belongs to project "B" and depends on task "C" and not vice versa is
to note that "B" is tagged with "project" and "C" is tagged with
"task". You are right,
> So its all string manipulation, no matter how you get at it.
or at least tiddler manipulation. But what if I could enhance tags to
explicitly define the relationship type. Then I could have tiddler
"A" tagged with "isA(task)", "belongsTo(B)", "dependsOn(C)". These,
in essence, are extended fields, but extended fields are more hidden
and obscured than tags. I hope that a future version of TW combines
the best of both tags and extended fields to make it a truly semantic
product.
Just an information that might be useful sometimes :
It seems that when you put your data in extended fields, a search on
this data (using the search macro) returns no tiddler.
So if you want to be able to retrieve some tiddlers by a search, you'd
better put your data in slices, sections ou use the DataTiddlerPlugin.
FrD
The basic, built-in search only looks at tiddler titles, text, and
tags. As you noted, it does not search custom fields. However, there
are several 'search enhancement' plugins that add extra search
features, including the ability to search in custom fields. Here's
one that I wrote:
http://www.TiddlyTools.com/#SearchOptionsPlugin
and here's another, written by Udo Borkowski:
http://tiddlywiki.abego-software.de/#YourSearchPlugin
enjoy,
-e
Eric Shulman
Tiddlytools / ELS Design Studios
in a tiddler myStuff
slice::myslice
!!section
my
data
section
!!end
reference via <<tiddler myStuf##section>>
or <<tiddler myStuff::slice>>
hope that helps,
Mike (from my phone)