March 5, 2008

Eclipse DataBinding In a Nutshell

IObservableValue
1. Unifies the get/set API for both targets and models via
getValue()/setValue(Object)
2. Provides "push" updates for one target or model
3. Unifies the Observer pattern API for both targets and models via
IValueChangeListener
4. Unifies the type system API for both targets and models via getValueType()

IConverter
1. Implements one-way conversion between target and model or vice-versa

IValidator
1. Implements one-way validation between target and model or vice-versa

Binding
1. Manages updates in both directions between one target and one model
2. Applies configurable IConverters in both directions
3. Applies configurable IValidators in both directions and at configurable
points in the editing life-cycle
4. Provides access to validation status results

DefaultBindSpec
1. Implements a registry of automatic/default validators and converters for
Binding

DataBindingContext
1. Manages creation/disposal of a set of Bindings
2. Bindings are created between individual properties on targets and models
3. Provides centralized access to all validation status results for collected
Bindings


The DataBinding API allows all participants to be configured independently, and
it is almost entirely symmetrical with respect to target and model. IMHO, this
is a clean design that separates the concerns well.