API Docs for: 1.0.0
Show:

Rebar.Application Class

Uses
Extends Backbone.Events

The application shell provides a simple default architecture consisting of a model, view and controller. The application is a singleton class in that there can only be one. It extends Backbone.Events and you can see the documentation for more detailed information.

Constructor

Rebar.Application

()

Example:

var appConfig = {
    ...
};
var app = new Backbone.Rebar.Application(appConfig);
app.on("applicationStateChange",function(state){
    ...
});
app.startup();

Methods

createController

()

Create a controller instance for the Application instance.

createModel

()

Create a model instance for the Application instance.

createRouter

()

Create a dependency router instance for the Application instance.

createView

()

Create a view instance for the Application instance.

extend

(
  • protoProps
)
Object

Extention functionality for the prototyped object that implements it.

Parameters:

  • protoProps Object

Returns:

Object: child

initialize

()

Initialization functionality for extended Application instances.

startup

()

This method kicks off Backbone's history management as well as loads the bootstrap data if a reference was passed through the constructors options argument.

Properties

_state

Integer private

The current state value.

state

Integer

Getters and setters for the current state value.

States

Object final

Available states for the application used to describe the current state of the Application.