A brief overview of some concepts and terminology used throughout the TV Application Framework and this documentation.
The framework is organised as a set of Require modules. A modified version of require.js 0.15 is supplied. We have experienced issues with later versions on some devices. We explicitly declare all module names. Problems have been encountered on some devices with anonymous module loading.
classical inheritance model based on John Resig’s
Class. All classes extend
antie/Class. This provides
extend() which you can use to create a sub-class.
You are welcome to use prototypal inheritance, classical inheritance or a mixture of both within your application, as long as you do not modify the prototypes of any framework-provided class, and ensure you call any overridden methods of the base class. Failure to do either of these may cause unexpected behaviour in the framework.
A few naming conventions are used throughout the framework:
var self = this;is used throughout for preserving
thiscontext in closures.
The above conventions result in code like:
Applications must extend the Application base class. This provides a
run() method that is executed when the Framework has fully initialised.
You must at some point in the application startup call the
Application.ready() method to instruct the framework that your application has started up.
On-screen UI controls are called Widgets. The GUI is built from a tree structure of instances of Widgets.
A Button or subclass of Button is a Widget that can obtain input focus (and thus be spatially navigated between). All Widgets have the notion of active state (i.e. when focus is moved to that widget, the Active child will receive focus).
Container widgets are widgets that may contain child widgets.
Components are modules that may be defined to provide a re-usable section of UI in a memory efficient manner. Components must be loaded into a ComponentContainer. For more information see Component system