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

Working with SproutCore's controllers

Just as most of the objects in the View layer are views, we call the primary objects in the Controller layer as controllers. The base class for these controllers is the SC.Controller class, but it does essentially nothing more than the SC.Object class it extends, so we will always use one of its subclasses such as SC.ObjectController, SC.ArrayController or SC.TreeController. The role of these three types of controllers should be fairly self-evident. The SC.ObjectController subclass proxies a single object, SC.ArrayController proxies an array or array-like object and SC.TreeController proxies a tree-like object.

To use any of these controllers is a matter of creating the controller and setting its content property ...

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