Value Model

In Visual Works, a Value Model is the reification of a variable. In other words, it is an object that acts like a variable (a First Class Slot). It holds a value, and you can read it and write it. A Value Model differs from a variable in two ways. First, it is a "subject" in the Observer Pattern. This means that other objects can depend on it and be notified when it changes. Second, it defines an interface, not an implementation. One implementation is Value Holder, which just stores the value and returns it, but other implementations are actually adapters to other Value Models or store the value in an instance variable of some other object.

An Application Model is a kind of composite model that is made up of a set of Value Models, Selection In Lists, and other more primitive models. This allows a model to match a view, which is more naturally an example of the Composite Pattern.


This seems related to the Whole Value Pattern. Comments?


Value Model can also refer to a language in which everything is an immutable value.

See original on c2.com