Archives for posts with tag: delegate

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 »

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 »