From f18fa1c0435899556944a3569b3b3c9d5cc20e75 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Tue, 11 Nov 2014 12:09:36 +0000 Subject: [PATCH] New section on event passing. --- doc/mkws-developer.markdown | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/doc/mkws-developer.markdown b/doc/mkws-developer.markdown index 25fd397..d6a9aa4 100644 --- a/doc/mkws-developer.markdown +++ b/doc/mkws-developer.markdown @@ -83,6 +83,25 @@ file `mkws-templates.js`. +Event passing +------------- + +The primary method of communication between components of the widget +set -- specifically, between teams and their widgets -- is event +passing. Widgets subscribe to named events; when something relevant +happens (such as the reception of a message from metasearch +middleware), the event is published, along with the relevant data. All +widgets that susbcribed to the event are then notified, and can take +appropriate action. + +Different kinds of events have different data associated with +them. This data is passed when the event is published, and so is made +available to the subscribing code. + +The possible events, and their associated data, are described +[below](#events). + + Defining new types of widget ---------------------------- -- 1.7.10.4