Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
A
 addRoute, Barefoot.APIAdapter.Server
 addSubview, Barefoot.View
B
 Barefoot
 Barefoot.APIAdapter
 Barefoot.APIAdapter.Server
 Barefoot.Collection
 Barefoot.CookieAdapter
 Barefoot.CookieAdapter.Client
 Barefoot.CookieAdapter.Server
 Barefoot.DataStore
 Barefoot.DataStore.Client
 Barefoot.DataStore.Server
 Barefoot.Errors
 Barefoot.Model
 Barefoot.Router
 Barefoot.Router.Client
 Barefoot.Router.Server
 Barefoot.Start.Client
 Barefoot.Start.Server
 Barefoot.Util
 Barefoot.View
 Barefoot.View.Client
 Barefoot.View.Server
C
 close, Barefoot.View.Client
 createError, Barefoot.Errors
 createExpressJsCallback, Barefoot.APIAdapter.Server
 createExpressJsRoute, Barefoot.APIAdapter.Server
 createRouteFactories, Barefoot.APIAdapter.Server
D
 delegateEventsOnSubviews, Barefoot.View.Client
 dispatchLocalApiCall, Barefoot.APIAdapter.Server
E
 Errors, Barefoot.Errors
 extractParams, Barefoot.APIAdapter.Server
F
 findRegisteredModelIdentifier, Barefoot.DataStore
 Functions
 Functions and Private Functions, Barefoot.APIAdapter.Server
G
 get
 getEnvironment, Barefoot.Util
 getRegisteredModels, Barefoot.DataStore
 getServerOnlyFiles, Barefoot.Start.Server
I
 initialize, Barefoot.DataStore
L
 loadMixins, Barefoot.Util
 loadMixinsForEnvironment, Barefoot.Util
M
 matchRoute, Barefoot.APIAdapter.Server
N
 navigate, Barefoot.Router.Server
 NotFoundError, Barefoot.Errors
P
 parse, Barefoot.DataStore.Client
 preInitialize
 prepareBrowserify, Barefoot.Start.Server
 Private Functions, Barefoot.Start.Server
 processCallbacks, Barefoot.APIAdapter.Server
R
 registerCollection, Barefoot.DataStore
 registerModel, Barefoot.DataStore
 removeSubview, Barefoot.View
 render
 renderSubviews, Barefoot.View
 route, Barefoot.Router.Server
S
 selectDOMElement, Barefoot.View
 set
 start
 sync, Barefoot.APIAdapter.Server
T
 toJSON, Barefoot.DataStore.Server
 toString
U
 urlRegexp, Barefoot.APIAdapter.Server
The functions generated by createRouteFactories use this function to create an actual api route.
function addSubview(subview)
Adds a Barefoot.View as subview of this view.
Barefoot makes code sharing between browser and server reality.
When building a fancy JavaScript based client you’ll probably have a straight forward REST API in the backend.
The server mixin for the APIAdapter takes the specified apiRoutes and does two things:
For the moment, the Barefoot collection does not introduce any new functionalities to Backbones collection.
The CookieAdapter gives generalized access to cookies on the client and server side.
This mixin contains client specific code for the Barefoot.CookieAdapter component.
This mixin contains client specific code for the Barefoot.CookieAdapter component.
The DataStore is a core object and extends the Barefoot.Model.
This mixin contains client specific code for the Barefoot.DataStore component.
This mixin contains client specific code for the Barefoot.DataStore component.
This class contains a set of predefined error objects which are thought to be used in your API route callbacks.
For the moment, the Barefoot model does not introduce any new functionalities to Backbones model.
The barefoot router extends the default backbone router by applying environment specific mixins to it
Client specific code for the Barefoot.Router.
This mixin contains any server side specific code for the Barefoot.Router.
This start mixin supplies a client specific start function to get the application up and running in the browser.
This start mixin supplies a server specific start function to get the application up and running on the node.js server backend.
Contains helper functions for loading environment specific mixins.
The barefoot view extends the default backbone view by applying an environment specific mixin to it.
This mixin contains client specific code for the Barefoot.View class.
Enhances the Barefoot.View class with server specific code fragments.
function close()
Removes a view from the DOM and ensures that all events of the view itself and its subviews are removed too.
function createError(httpStatusCode,
name)
Creates an Error with a specified HTTP status code and name.
function createExpressJsCallback(successHandler,
errorHandler,
callbacks)
Encapsulates given callback function or an array with stacked callback functions and prepares it so it can be registered as an express js route.
Creates an Express.JS request handlers.
function createRouteFactories()
This is called by the constructor of APIAdapter and is heavily inspired by the fancy Express.JS Application API.
function delegateEventsOnSubviews()
Binds all defined events of this view.
function dispatchLocalApiCall(httpMethod,
url,
data,
options)
This is the core where server side API callbacks are dispatched.
Takes a match object of a regex execution and extracts the parameters identified by keys.
function findRegisteredModelIdentifier(model)
Scans the registered models and collections for the given model.
function get(key)
Returns a specific cookie value.
function get(key)
Returns a specific cookie value.
function getEnvironment()
Returns a string representing the current environment.
function getRegisteredModels()
Returns an object literal containing all currently registered models and collections.
Returns an array with absolute paths to the files contained in the server sub folder.
function initialize()
Ensures that an empty registeredModels instance variable is created for the DataStore.
function loadMixins(environment)
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 loadMixinsForEnvironment(environment)
Loads mixins for a specific environment
This function takes an HTTP method and a URL.
function navigate(routeUri)
Rewrites Backbone.Router.navigate to replicate its functionality when rendering the application on the server.
If any resource was not found, this is the generic error for that situation.
function parse(serializedStore)
Takes serialized DataStore information (most commonly created with Barefoot.DataStore.Server.toJSON) and tries to restore the described datastructure.
function preInitialize(options)
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.
Adds the Browserify middleware the the given express.js app.
This function is used to run a callback function or an array of stacked callback functions which are registered for an API route.
function registerCollection(identifier,
model)
An alias for registerModel.
function registerModel(identifier,
model)
Registers a specific Barefoot.Model or Barefoot.Collection with the given identifier.
function removeSubview(subview)
Removes Barefoot.View from this view (if present as subview) and sets the former subviews parentView property to undefined.
function render(view)
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()
Overwrites the default Backbone.View.render method.
function renderSubviews()
Iterates each present subview of this view and renders it to the DOM.
function route(routeUri)
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 selectDOMElement($)
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 set(key,
value)
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 start()
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(Router,
APIAdapter,
startOptions)
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 sync(method,
model,
options)
During startup on the server, this function replaces Backbones own sync implementation to shortcut “local” API calls.
function toJSON()
Serializes all models and collections of this DataStore into a plain JavaScript object.
function toString()
String representation of this module.
function toString()
String representation of this module.
Takes a route URL with possible placeholders like “/contacts/:contactid” and prepares a RegEx for later pattern matching when trying to resolve a route
Close