Extricate Immutable Object

This is a proposed name for the part of the FlyweightPattern that asks you to differentiate between the intrinsic and extrinsic properties of an object.

Philosophically, the intrinsic properties of an object are properties that can't change if you still mean the same object. For example, for most U.S. citizens a SocialSecurityNumber? is a prime example of an intrinsic property. You can't change your SocialSecurityNumber? and still be the same person, in most models. An extrinsic property is one such that the object it belongs to doesn't change identity just because the value of the property changes. For example, a customer's address is probably extrinsic -- he or she is the same customer even after moving.

The intent of extricating the intrinsic properties of an object is to create an immutable part. For example, you might divide all the 'A' objects in a document into their intrinsic and extrinsic parts. The intrinsic part is probably the Unicode value of an 'A'. The extrinsic part includes properties such as a particular 'A' object's position on a page.

Extricating the immutable part of an object lets you take advantage of the immutability. In the FlyweightPattern, this makes it possible to share large numbers of fine-grained objects. - SteveMetsker


EditText of this page (last edited February 7, 2001) or FindPage with title or text search