Skip to content

Core Events

Tom Taylor edited this page Nov 30, 2017 · 10 revisions

Due to the modular approach we've taken for the architecture of the client application, we make heavy use of the observer code design pattern, and use events to keep the various parts of the application updated.

Additionally, our chosen framework for structuring the client application (Backbone.js) has very good support for an event-driven approach.

Backbone built-in events

Backbone supports a wide variety of different events which we make use of extensively throughout the application. Please see the Backbone.js documentation for more information:

Adapt built-in events

In addition to the Backbone events, we've added many events which we use throughout the application, and can be listened to by any plugin code.

We also allows modules to plug in to events through events triggered by core views, models and collections. These events can be listened to by using the following syntax:

Origin.on('origin:dataReady', function() {
  // Triggered when everything is loaded
});

Core Events

See below for a list of core events, and what they signal.

  • origin: the app's data has been loaded, and is about to initialise
  • origin:initialize: the app has initialised
  • ``
  • ``
  • ``
Clone this wiki locally