Change Value to Reference
From CSSEMediaWiki
(Difference between revisions)
Brett Ward (Talk | contribs) (Page Outline Added - not completely happy with it though) |
m (Reverted edits by Ebybymic (Talk); changed back to last version by Brett Ward) |
||
(2 intermediate revisions by 2 users not shown) | |||
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}} |
Latest revision as of 03:23, 25 November 2010
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