The binding properties pattern is combining multiple observers to force properties in different objects to be synchronized or coordinated in some way. This pattern was first described as a technique by Victor Porton.[1] [2] This pattern comes under concurrency patterns.
As an alternative to the aspect-oriented implementation of mutual properties, property binding can be proposed. In LibPropC++ C++ library it is implemented too.
Some weakness in the LibPropC++ (with property binding):
There are two types of binding. One-way binding should be applied when one of the properties is read-only. In other cases, two-way binding must be applied.[2]
Infinite loops can be eliminated by blocking the signal, or comparing the assigned value with the property value before assignment, or eliminating unnecessary assignments.[2]
Binding properties of different types can be achieved through type conversions.[2]
Binding properties with transformations can be achieved through reducing the transformation function to the problem of binding properties, and the function can be imaginary consider as Type Conversions.[2]
Properties are being kept synchronized automatically. Between library calls they always have the values expressed by the EqualityConstraints.
Property changes watching mechanism acquires some resources.
Code sketch for one-way binding may look like as follows:
bind_multiple_one_way(src_obj, src_prop, dst_objs[], dst_props[])[2]
Two-way binding can be expressed as follows (in C++):
Accomplishing the binding (i.e. connecting the property change notification in an event handler) may be like as follows: