
![]() |
Show Changes |
![]() |
|
![]() |
Recent Changes |
![]() |
Subscriptions |
![]() |
Lost and Found |
![]() |
Find References |
![]() |
Rename |
![]() |
Administration Page |
| Search |
History
| 9/28/2004 9:41:09 AM |
| -171.159.128.10 |
![]() |
List all versions |
Lots and lots of power can come from adding more WikiBehaviors and by allowing them to be combined together. For example, I want to allow the entire sidebar to be generated using Wiki text. I want to be able to list the most recently visited topics on my page. I want to have a list of related topics on a page. In short, I want dynamic content.
In the current version of FlexWiki, there's a little bit of a way to get this: WikiBehaviors. These are single "functions" that build a bridge into the actual C# implementation of FlexWiki. If I want to do something dynamic (e.g., transform some XML for a Blog RSS feed and display the result in a topic), I can write some C# code in the FlexWiki engine and then expose it as a WikiBehavior. This is example what was done with the XmlTransformBehavior -- cool stuff!
However... Requiring new C# code for each dynamic thing you want to do (1) doesn't scale and (2) isn't a good solution for most people ![]()
Enter WikiTalk...
Imagine something like this as wiki text somewhere that controls how the WikiPane looks:
@@
VerticalStack(
[
Panel(
Icon("*/images/Home.gif"),
CurrentTopicNamespace,
HomeForNamespaceURL(CurrentTopicNamespace),
Property(CurrentTopicNamespace, "Description", "[default value for absent property]")),
ArrowCommand(EditOrRestoreTitle, EditOrRestoreURL(CurrentTopicFullName),
ArrowCommand("Print", PrintURL(CurrentTopicFullName)),
ArrowCommand("Recent Changes", TopicURL(DefaultNamespace, "RecentChanges")),
ArrowCommand("Lost and Found", TopicURL(DefaultNamespace, "LostAndFound")),
ArrowCommand("Subscriptions", TopicURL(DefaultNamespace, "Subscriptions")),
ArrowCommand("Find References", FindReferencesURL(CurrentTopicFullName)),
ArrowCommand("Rename", RenameURL(CurrentTopicFullName)),
Panel(
Icon("*/images/Search.gif"),
null,
"Search",
SearchBox(DefaultNamespace)),
Panel(
Icon("*/images/Versions.gif"),
"Search",
VersionsBox(CurrentTopicFullName))
Panel(
Icon("*/images/About.gif"),
null,
"About",
AboutThisFederation)
]
)
@@
To support this, we need two things: a more powerful language and a bigger library of behaviors (or, more generally, objects).
One of the interesting things that happened when we build the InterWikiBehavior is that the @@InterWiki("bar", "foo", "foo")@@ style of ExternalWikiLinks was (in the implementation) mapped into the behavior string. I wonder what would happen if we took this approach more generally and had behaviors for all of the interesting stuff that you can in wiki text (e.g., bold, headings). Then the formatter would first map everything down to interleaved text and behaviors. The execution could then be much less scattered (as it is now) and centralized around the parsing and evaluation of the behaviors tree.
Bold( Heading1() - etc...