Archives for category: development

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 »

A few days ago there was a post on the SproutCore Google Group by an individual asking if his code could be reviewed by people in the community. Given the request, I checked out the code from github and began to go through it. In a nutshell, I was reviewing a small SproutCore application that allows you to simply log in and log out of the application. The application makes use of Ki, a statechart framework, in order to keep track of what state the application is currently in. In addition, there are two custom views. One view represents a toolbar displaying whether you are logged in or logged out, and another view that represents a login form. The login form view also contains logic that will fake the log in procedure.

Read the rest of this entry »

I recently got a question asking, to greatly simplify, if it is possible to dynamically load and update localized strings. The answer is yes, and you can find my original response here. However, instead of leaving the response buried away as a comment within another post, I figured I’d make part of the answer its own post.

Read the rest of this entry »

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


For anyone out there that has been using the Lebowski framework to test a SproutCore application, please be advised that Lebowski will currently not work with Internet Explorer versions 7 and 8. This is due to those versions of IE not following JavaScript standards and SproutCore not currently having a particular work around for IE. That being said, Lebowski framework does work with Firefox, Chrome and Safari.

For those interested in what is actually causing the problem and want a fix for it, read on…

Read the rest of this entry »

For those of you who either develop web applications using the SproutCore framework or test SproutCore applications using the Lebowski framework, take note that a new SproutCore path picker tool has been released by Josh Holt. The tool is an add-on for the Firefox browser, and it will generate a full property path for any view that you click on, with or without a layer ID. It’s really awesome!

For developers, the SproutCore PathPicker tool will help save you headaches when you want to debug your app and try to track down the right path to the view, say when you use the Firebug console. For testers using the Lebowski framework, this will save you from having to dig through all the code to get the correct property path that you need to supply to the framework in order to get back a corresponding proxy object.

Many thanks to Josh for creating this tool!

– FC

This past weekend I attended JSConf 2010 in Washington, DC, and, I have to say, I was mighty impressed with what I saw. Although I couldn’t see everything, there were still a lot of fantastic presentations of what JavaScript can now do — not just on the client-side, but also on the server side!

Read the rest of this entry »

Well, it’s been a few weeks since I’ve had enough time to sit down at write another post, but here I am at it again. However, for my latest post, I’ve decided to write about a topic in SproutCore that sits outside of the more mainstream features of the framework: that is event simulation.

Now, now — hold on. I see you reaching for you mouse ready to checkout some other website, but hear me out on this topic. While event simulation in SproutCore isn’t really promoted much, it is useful to know. How? When you want to do test automation.

Read the rest of this entry »

A nice feature of SproutCore is the ability to easily localize strings in your application. As an example, I can create a strings.js file that contains the following:

Read the rest of this entry »