O'Reilly logo

SproutCore Web Application Development by Tyler Keating

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Coding with statecharts

While you can, and should, design statecharts for applications written in any language, only a few frameworks allow you to directly implement the statechart in your code. Fortunately for us, SproutCore is one of those frameworks. What's really amazing is that all the hard work we did designing the statechart diagram takes care of all the logic for our application state layer. All we have to do now is implement the states one-for-one into the code. Let's look at how we do that now.

While you can have multiple statecharts in your application, we only need one to manage the application state. To create a statechart, SproutCore provides the SC.StatechartManager mixing that will turn any object into a statechart. While some people ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required