Standing on the shoulders (well, maybe feet) of giants
[ start | index | login or register ]
start > Value Object Participants v2

Value Object Participants v2

Created by Dirk Riehle. Last edited by Dirk Riehle, 2 years and 74 days ago. Viewed 275 times. #5
[diff] [history] [edit] [rdf]
labels
attachments
The Client class uses Value instances like built-in datatypes (to the extent that this is possible with your implementation language). Whenever the Client wants to change the value of one of its attributes, it replaces the attribute object rather than changing it. You write code like
attr = attr.calculate();
rather than
attr.calculate();

The Value class represents a domain-specific value type. It is implemented such that Value instances are immutable objects, meaning that its instances cannot change their state. Rather, as the result of some computation, a new Value instance with the desired internal state is returned.

Next

one comment (by Dirk Riehle) | post comment
Copyright (©) 2006 by Dirk Riehle or the respective authors. All rights reserved.