Object State, Object Constraints


Readers familiar with typical treatment of object development might be curious as to the absence, so far, of any discussion of object state other than the willingness to notify others of state changes as recorded on side 6 of the object cube. Some definitions of objects suggest that they encapsulate state; and modeling methods and tools, such as Unified Modeling Language (UML), provide sophisticated models for capturing state-of-the-object information.

Object thinking shows little concern about state when objects are discussed specifically because a properly designed object has very little interesting state. What state it might have should be private ”behind the encapsulation barrier ”except to the extent that the object is willing to make public the fact that a state change occurred.

Most discussion about object state is really about state-based constraints to be imposed on an object. Such constraints are not intrinsic to the object itself; they are an aspect of the situation in which the object finds itself employed. This kind of state modeling is important but not important in advancing our understanding of individual objects. For this reason, discussion of state modeling involving objects will be taken up in Chapter 9.

All other constraints that might be imposed on an object are also reflective of a situation, not of the object per se. Table manners, for example, reflect a set of rules that promote or inhibit intrinsic human eating behavior ”fingers and communal bowl in an Ethiopian ethnic restaurant; a plethora of special-purpose utensils and prescribed behaviors at a formal state dinner. It s a mistake to attempt to incorporate this kind of variation into an individual object s specification. This type of rule-based constraint will also be addressed in Chapter 9.




Microsoft Object Thinking
Object Thinking (DV-Microsoft Professional)
ISBN: 0735619654
EAN: 2147483647
Year: 2004
Pages: 88
Authors: David West

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net