AugmentedDesignLab/botprint2 — pull request #30 by linzhp (2012-08-12 19:01:24+00:00)
Title: Validation

This is the implementation of a validation workflow much simpler than the validation chain one you suggested. However, it doesn't have any singleton that could be accessed globally.

The core ideas in this implementation are:

* The robot model object maintained by ValidationHandler is kept private by making it a local variable.
* The `robot.update` serializes the robot to a JSON string before sending it with the `robotUpdated` event
* The recipient of `robotUpdated` event deserializes the JSON to construct the robot model again.
* The model object defines a list of attributes that need to be serialized, so as to avoid passing unnecessary data.

Question:

Should we make the event bus serialize all payload objects by default, so that senders and recipients of events won't share any data?