There is a structure called Stativus:
https://github.com/etgryphon/stativus
This is essentially a factorized version of the Sproutcore state diagram structure. I use it in the project and am very pleased with it.
The documentation, unfortunately, is too simplified, but the library is quite small and easy to use. I am currently working on a blog post, it will be published on my blog http://zubairov.posterous.com soon.
source share