Adds a Barefoot.View as subview of this view.
function addSubview( subview )
Removes a view from the DOM and ensures that all events of the view itself and its subviews are removed too.
function close()
Creates an Error with a specified HTTP status code and name.
function createError( httpStatusCode, name )
Encapsulates given callback function or an array with stacked callback functions and prepares it so it can be registered as an express js route.
function createExpressJsCallback( successHandler, errorHandler, callbacks )
This is called by the constructor of APIAdapter and is heavily inspired by the fancy Express.JS Application API.
function createRouteFactories()
Binds all defined events of this view.
function delegateEventsOnSubviews()
This is the core where server side API callbacks are dispatched.
function dispatchLocalApiCall( httpMethod, url, data, options )
Scans the registered models and collections for the given model.
function findRegisteredModelIdentifier( model )
Returns a specific cookie value.
function get( key )
Returns a specific cookie value.
function get( key )
Returns a string representing the current environment.
function getEnvironment()
Returns an object literal containing all currently registered models and collections.
function getRegisteredModels()
Ensures that an empty registeredModels instance variable is created for the DataStore.
function initialize()
Since Barefoot is runnable on server and client, this function returns environment specific code read from the “server” and “client” folder and returns the needed code fragments.
function loadMixins( environment )
Loads mixins for a specific environment
function loadMixinsForEnvironment( environment )
Rewrites Backbone.Router.navigate to replicate its functionality when rendering the application on the server.
function navigate( routeUri )
Takes serialized DataStore information (most commonly created with Barefoot.DataStore.Server.toJSON) and tries to restore the described datastructure.
function parse( serializedStore )
Ensure that the setupRequestContext function is saved into the router for later use.
function preInitialize( options )
This function is called before any initialization or constructor of the Barefoot.Router is executed.
function preInitialize( options )
An alias for registerModel.
function registerCollection( identifier, model )
Registers a specific Barefoot.Model or Barefoot.Collection with the given identifier.
function registerModel( identifier, model )
Removes Barefoot.View from this view (if present as subview) and sets the former subviews parentView property to undefined.
function removeSubview( subview )
Calls the Barefoot.View.Shared.render method of the passed Barefoot.View.
function render( view )
This function initiates the rendering of the passed view.
function render( view )
Overwrites the default Backbone.View.render method.
function render()
Iterates each present subview of this view and renders it to the DOM.
function renderSubviews()
This replacements for the route function of Backbone.Router ensures that each route defined in the router is added to the Express.JS app.
function route( routeUri )
Tries to select a DOM element for this View using the passed DOM manipulator that confirms to the jQuery API (http://api.jquery.com/).
function selectDOMElement( $ )
Sets the value of a cookie with the specified key.
function set( key, value )
Sets the value of a cookie with the specified key.
function set( key, value )
When the application is coming up, this method gets called from Barefoot.Startup.Client.
function start()
Calls the passed starter function, buffered in preInitialize.
function start()
Ensures that Backbone is available globally on the client.
function start( Router, APIAdapter, startOptions )
On start on the server, this function creates an APIAdapter if apiRoutes are present in the startOptions.
function start( Router, APIAdapter, startOptions )
During startup on the server, this function replaces Backbones own sync implementation to shortcut “local” API calls.
function sync( method, model, options )
Serializes all models and collections of this DataStore into a plain JavaScript object.
function toJSON()
String representation of this module.
function toString()
String representation of this module.
function toString()