Application-specific commands
I've always wanted to be able to implement application-specific commands and I realized today that I was trying too hard--its really very easy, and especially now in AgileWiki3.
All you really need to do is to set a LedgerEntry key/value pair on a DescriptorUnit. (Previously this would have been a header.) Then in the applicability rule for the command (now part of the command interface), just check for an appropriate LedgerEntry value. Bingo! That's all that is needed.
I've also been thinking about how to implement an application and have decided to implement the (very simple) higher/lower game. Pick a number that I'm thinking of (0-9) and I'll say higher or lower. You get 3 guesses. Easy to implement and a nice example of how to implement an application. (All be it, a stateless one in this case.)
A second game could be tic-tac-toe. This game could be statefull and could also illustrate an application-specific command set.
I'm thinking it would be quite helpful to demonstrate how to program applications early in the development of AgileWiki3.
Bill
0 Comments:
Post a Comment
<< Home