Change Value to Reference
From CSSEMediaWiki
(Difference between revisions)
Brett Ward (Talk | contribs) (Page Outline Added - not completely happy with it though) |
Brett Ward (Talk | contribs) m |
||
Line 2: | Line 2: | ||
This refactoring is the act of changing a class with many equal instances into a single object by turning one of these values into a reference. | This refactoring is the act of changing a class with many equal instances into a single object by turning one of these values into a reference. | ||
+ | |||
+ | [[Change Reference to Value]] is the opposite of this refactoring, and due to the lack of clarity on what is a value object and what is a reference object, it is common to switch between the two while trying to make a decision. | ||
== See Also == | == See Also == | ||
{{Refactoring}} | {{Refactoring}} |
Revision as of 21:04, 14 October 2009
In some systems, objects may be classified as reference objects (such as things like "customer" or "account"), or value objects (such as "date" or "money").
This refactoring is the act of changing a class with many equal instances into a single object by turning one of these values into a reference.
Change Reference to Value is the opposite of this refactoring, and due to the lack of clarity on what is a value object and what is a reference object, it is common to switch between the two while trying to make a decision.
See Also