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 »