Archives for posts with tag: ki

As more people start to adopt statecharts to help organize application logic and manage the app’s current states, a question begins to appear about what, if anything, are SproutCore’s controllers useful for? After all, application logic that used to be located in controllers is now being yanked out and placed into individual state objects. This would appear to make controllers redundant. But is that really the case? If so, then what does that mean for classes such as SC.ObjectController, SC.ArrayController and SC.TreeController? Should they simply be removed from SproutCore altogether? To really answer these questions and know where a statechart begins and controllers end, we first have to understand what controllers really are, and, more specifically, what controllers are with regard to SproutCore.

Read the rest of this entry »

I admit it: I have neglected to directly talk about something that people who have been using Ki end up running into, and it’s about “pivot state” errors. This is something that I have been asked about a few times, and while I do describe what the error means, I, for some darn reason, just keep forgetting to write it down for others to learn about. Well know more. This sad lack of information shall end now.

Read the rest of this entry »

When developing Ki for SproutCore, the main goals I aim for are the following:

  1. Follow the principals laid out in David Harel’s seminal paper Statecharts: A Visual Formalism for Complex Systems.
  2. Make it intuitive to take a statechart diagram and translate it into code, and vice versa.
  3. Help reflect code that is simple, modular, extensible and maintainable.

In addition to the above, Ki needed to integrate well with SproutCore itself, meaning that it contained the all necessary functionality allowing a statechart to respond to actions and events propagated from various parts of SproutCore, and, in order to function, required the minimal amount of effort to add a statechart to an application.

Read the rest of this entry »

The first SproutCore interview I attempted with Eloqua’s Matt Grantham and Ryan Mudryk went well and it acquired a lot of viewership. Knowing that, I decided to test the waters again and try a second SproutCore interview this time with Michael Harris who created the SproutCore Sudoku game. Mike is consultant and local here in the Washington, DC area, so he and I met one day during lunch to discuss his game and SproutCore itself.

Read the rest of this entry »

As of today, the Ki framework has become the official statechart framework for SproutCore. This has replaced the original statechart framework that Mike Ball, Evin Grano, and I originally worked on. But what does this mean for anyone who is already using Ki for their SproutCore project? Well, it means a few things.

First, I will still continue to maintain the original Ki framework. It won’t be going away. But, over time, the shift in focus will be on Ki that was brought in for the next version of SproutCore. So, for now, any updates will be done on both versions of Ki, that way everyone will get the benefit of the latest fixes and enhancements. Of course, if you want to use Ki that comes with latest commit of SproutCore, the root namespace will now be under SC, not Ki. And please note that Ki is not part of SproutCore v1.4.x. So if you are building your app exclusively under SproutCore v1.4.x, then you’ll still be working with the original Ki framework.

For those who are using Ki or want to use the framework, I will be shortly getting around to writing posts, but if you want to get some information now, then please check out this SproutCore group post here.


For those of you looking for a good example of what SproutCore can do and is fun, then I highly recommend you check out Michael Harris‘s sudoku game. Mike (@hvgotcodes) put in a lot of work and it definitely shows. Special credit must also go out to Matt Grantham (@MattGrantham) for all the graphics and styling he did for the app.

Not only is the sudoku game built with the SproutCore framework, but it also makes use of the Ki framework in order for the game to manage all of its states, which is pretty cool! From what Mike has told me, he intends to write up a couple of blog posts soon that will go over how he implemented his sudoku app. I’m definitely looking forward to reading them.

Just a quick announcement that I’ve open sourced a new statechart framework for SproutCore called Ki (pronounced “key”) that you can start using today. Ki provides full statechart support for what is described in David Harel’s original paper “Statecharts: A Visual Formalism For Complex Systems” in addition to other key features useful for today’s event-driver systems.

Parts of Ki were derived from the statechart framework that is already included with the latest SproutCore on github. At first I started to modify the original statechart framework to incorporate all the new features that Ki supports; however, I soon realized that it was just easier to start from scratch in order to make a proper implementation.

You can get the Ki framework by going to