Replace Data Value with Object
From CSSEMediaWiki
(Difference between revisions)
m (Reverted edits by Ebybymic (Talk); changed back to last version by Brett Ward) |
|||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
When you have an item of data that needs additional data or behaviour, for example a String representing a phone number that needs special formatting behaviour (area codes, country codes, etc) that cannot simply be added to the String. | When you have an item of data that needs additional data or behaviour, for example a String representing a phone number that needs special formatting behaviour (area codes, country codes, etc) that cannot simply be added to the String. | ||
To do this, we turn the simple data object into an object. In the case above the phone number will become an object of it's own. | To do this, we turn the simple data object into an object. In the case above the phone number will become an object of it's own. |
Latest revision as of 03:08, 25 November 2010
When you have an item of data that needs additional data or behaviour, for example a String representing a phone number that needs special formatting behaviour (area codes, country codes, etc) that cannot simply be added to the String.
To do this, we turn the simple data object into an object. In the case above the phone number will become an object of it's own.