Java Modeling in Color With UML PDF
Java Modeling in Color With UML PDF
Domain-Neutral Component
Inheritance link
(points from
specialization to
generalization)
An interface specifies
method signatures. -->
<--An implementer
implement the corres-
ponding methods.
A.
0..1
...Component.Class9
<<text label, called a stereotype>>
0..1 1 0..* attribute
Class6
method
attribute
1
method 0..*
0..* ...Component.Class10
0..1
An underlined method is a
Class5
static method (class method), a
attribute method performed by the class
method rather than by the objects in
classMethod the class. (Such methods often
delegate work to a corresponding
data management object.)
Convention: A clipped
A Class5 object might class symbol indicates
hold an Interface2 the class is from another
implementer. component. The symbol
0..1 includes attributes and
interface methods when helpful
Interface2 in understanding the
component under
method consideration.
B.
FIGURE 1-1 Class-diagram notation and conventions. 1
2 Java Modeling in Color with UML
1: method
The arrows are messages,
2: method
from sender to receiver
Time moves
(and back again).
down the page;
message arrows
may travel left to A clipped arrowhead
3: method
right or right to left. indicates an asynchronous
4: 'getAttribute' message.
Convention: Use "FOR each" Convention: Use IF and ELSE Convention: Use notes to list
notes to indicate iteration (rather notes for conditions (rather than arguments for messages that
than a UML asterisk, limited to UML brackets; need room for need them (helps keep message-
a single message-send). writing the condition). arrow labels from becoming too long).
1.1 ARCHETYPES
Now lets turn our attention to this chapters first major topic: archetypes.
Heres the concept we want to communicate:
Stereotype
1. An unvarying model, as though cast from a mold
2. A text tag for annotating a UML diagram element
3. A broad categorization of classes
Archetype
A form from which all things of the same kind more or less follow.
[DERIVED FROM WEBSTER75 AND HAYAKAWA68]
Archetypes, Color, and the Domain-Neutral Component 3
Its a fact. Archetype says it best. An archetype is a form from which all
classes of the same kind more or less followincluding attributes, links,
methods, plug-in points, and interactions.1
Yet which archetypes prove most useful in building better models?
Weve developed hundreds of models in dozens of business and engi-
neering domains. Along the way, we continually looked for ways to
abstract up to a domain-neutral componenta small model of arche-
types that we could apply again and again in our workshops and men-
toring assignments. Why? We felt we could teach more in less time and
accomplish more in less time. Better for our clients, more interesting for
us, win-win.
Over time, weve discovered four interconnected archetypes that
form a domain-neutral component:
Wed like to acknowledge that Peter Coad and Mark Mayfield laid
the early groundwork for these four archetypes, first described in [Coad92]
and later extended with David North in [Coad9597].
1
Archetypes are forms that are more or less followed. The more or less aspect is essential.
In contrast, stereotypes are unvarying. Also in contrast, inheritance and interfaces specify
names that must be followed rather than more or less followed.
4 Java Modeling in Color with UML
<<moment-interval>>
Sale
number
date
calcTotal
<<role>>
Cashier
<<party>>
Person authorizedFor
legalName
dateOfBirth <<role>>
authorizedFor Owner
authorizedFor
also provides behavior across the collection of all things that correspond
to its description.
For example, your red pickup is a vehicle; its a thing with its own ser-
ial number (called a vehicle identification number), purchase date, color,
and odometer reading. The corresponding catalog-entry-like description is
vehicle description; it establishes manufacturer, model number, date of man-
ufacture, and available colors; it also is a good place to locate business-related
methods like, how many of these trucks are in good working order?
1.2 COLOR
In September of 1997, we started building models with four colors of Post-
it Notes: pink, yellow, green, and blueone for each archetype. Developers
and domain experts new to model building on the team commented a
number of times along the way, But how could you possibly build effec-
tive models without color? That caught our attention! So we developed
this technique in practice, published initial findings [Coad97a], and pre-
sented this approach in an OOPSLA 97 tutorial [Coad97b].
As is often the case, practice preceded theory. Seeing these ideas work
so well in practice, we began investigating color and why it appears to
have such a profound effect on building better models.
More importantly, one can use color to add layers of new content to
models. Those layers are visible from a distance, so that big picture
model content comes across even before one starts reading the details.
We call this effect spatial layering; it means that a model is capable of
delivering an overview and a detailed view all within itself, without need-
ing to break visual context by jumping to some other representation.
Color makes spatial layering possible.
Among the most powerful devices for reducing noise and enriching
the content of displays is the technique of layering and separation,
visually stratifying various aspects of the data. [He then describes
how to do this: use distinctions in shape, lightness, size, and espe-
cially color.]
EDWARD R. TUFTE [TUFTE90]
<<role>>
A way of <<moment-interval>> <<mi-detail>>
Role
participating MomentInterval MIDetail
in something
customValue defaultValue
<<moment-interval>>
0..*
MomentInterval
<<role>> <<mi-detail>>
number
Role 1 1..* MIDetail
1 0..* dateOrDateTimeOrInterval
assignedNumber qty
priority
status
total
0..*
status
actual
0..1 plan
Not shown:
- Link attributes
- "Class as collection" attributes
<<description>>
Drop a class along
<<thing>> Description
the links when you
PartyPlaceThing
assessAcrossPPTs don't need the level of
specificity provided by
assessAcrossRoles findAvailable
that class; adjust method
getCustomElseDefaultValue calcQtyAvailable
names accordingly.
listRoles calcTotalFor
listPPTs listPPTs
assessAcrossPPTs listDescs
assessAcrossDescs
<<moment-interval>>
MomentInterval
<<role>>
makeMomentInterval
Role
addDetail
assessAcrossMIs calcTotal <<mi-detail>>
listMIs recalcTotal MIDetail
listRoles complete
cancel calcTotal
assessAcrossRoles
mi_generateNext
mi_assessWRTPrior
mi_assessWRTNext
The "mi" method-name prefix
mi_comparePlanVsActual indicates a method that interacts
listMIs with pink moment-intervals.
Not shown: assessAcrossMIs
- Getters/setters
- Adders/removers
<<thing>> <<description>>
PartyPlaceThing Description
assessWithPlugInElseDefault
0..1
interface
<<plug-in point>>
IAssess
assess
makeMomentInterval
1
interface
<<plug-in point>> For example,
IMakeSale
IMakeMomentInterval
makeMomentInterval
<<description>>
<<thing>> Description
PartyPlaceThing type
serialNumber description
name itemNumber
address defaultValue
0..* 1
customValue assessWithPlugInElseDefault
assessAcrossRoles assessAcrossPPTs
getCustomElseDefaultValue findAvailable
listRoles calcQtyAvailable interface
listPPTs calcTotalFor <<plug-in point>>
0..1
assessAcrossPPTs listPPTs IAssess
listDescs
1
assessAcrossDescs assess
0..1 plan
FIGURE 1-9. Archetypes and their attributes, links, methods, and plug-in points.
We also use white occasionally, for notes, for plug-in points, and for
system-interaction proxies.
<<description>> <<description>>
14
PartyDescription <<place>> PlaceDescription
<<party>>
type Place type
Party
0..1
0..1 interface
<<role>> <<plug-in point>>
1..*
ThingRole IAssess
<<mi-detail>>
assignedNumber
0..* 0..*
MomentIntervalDetail assess
status
qty
assessAcrossMIs
calcTotal
listMIs
listRoles
assessAcrossRoles
0..*
association
calc
how to visualize it: calc calc
calc
dynamically calc
assess
calc
FIGURE 1-13. How to visualize that link, dynamically.
by sending messages to each one. Figure 1-13 shows how to visualize the
implicit dynamics of an association link.
Thankfully, sequence diagrams are explicitly dynamic, giving added
visual clues about the sequence of interactions and message sends inher-
ent within a class diagram.
Here are the archetypal interactions for the domain-neutral compo-
nentand indeed the archetypal interactions for all components in this
book (Figures 1-14 to 1-19).
<<description>>
<<description>>
<<party>> PartyDescription <<place>>
PlaceDescription
Party Place
type
type
serialNumber description serialNumber
description
name itemNumber name
itemNumber
address defaultValue address
defaultValue
customValue 0..* 1 assessWithPlugInElseDefault customValue 0..* 1
assessWithPlugInElseDefault
assess assessAcrossParties assess
assessAcrossPlaces
assessAcrossRoles findAvailable assessAcrossRoles
findAvailable
getCustomElseDefaultValue calcQtyAvailable getCustomElseDefaultValue
Interacts with its calcQtyAvailable
listRoles calcTotalFor listRoles
yellow roles or its calcTotalFor
listParties listParties listPlaces
pink moment-intervals listPlaces
assessAcrossParties listDescs assessAcrossPlaces
listDescs
1 assessAcrossDescs
1 assessAcrossDescs
Interacts with its
green parties or
its pink moment- 0..1
intervals
interface 0..1 0..1
0..1
<<plug-in point>>
<<role>> interface
<<role>> IAssess
PlaceRole <<plug-in point>>
Interacts PartyRole
with its pink assess assignedNumber IAssess
assignedNumber
moment-intervals status
status assess
<<moment-interval>> assessAcrossMIs
assessAcrossMIs
MomentInterval 0..* 1 listMIs
listMIs 1 0..*
listRoles
listRoles number
assessAcrossRoles
assessAcrossRoles dateOrDateTimeOrInterval
priority
total
status
makeMomentInterval
<<moment-interval>> 1 0..* <<moment-interval>>
1 0..* addDetail
PriorMI NextMI
calcTotal
assess
recalcTotal
complete
cancel
<<description>>
Interacts mi_generateNext
<<thing>> ThingDescription
- With its pink mi-details mi_assessWRTPrior
Thing type
- With its pink prior moment-intervals mi_assessWRTNext
- With its pink next moment-intervals serialNumber description
mi_comparePlanVsActual 0..*
- With its coresponding yellow roles, name itemNumber
listMIs actual
green party/place/things, or address defaultValue
assessAcrossMIs
blue descriptions assessWithPlugInElseDefault
customValue 0..* 1
1 0..1 plan assessAcrossThings
assess
assessAcrossRoles findAvailable
getCustomElseDefaultValue calcQtyAvailable
1
listRoles calcTotalFor
interface
listThings listThings
<<plug-in point>>
assessAcrossThings listDescs
IMakeMomentInterval
assessAcrossDescs
1
makeMomentInterval
0..1 0..1
<<role>> interface
1..*
ThingRole <<plug-in point>>
<<mi-detail>> IAssess
assignedNumber
0..* 0..*
MomentIntervalDetail
status
qty assess
assessAcrossMIs
calcTotal
listMIs
listRoles
assessAcrossRoles
In this sequence,
1: assessAcrossMIs a pink mi-detail
interacts directly
FOR each with a blue description
2: calcTotal
moment-interval (implying a direct rather
than indirect link between
the two in a corresponding
FOR each
3: calcTotal class diagram).
moment-interval
4: calcTotalFor
detail
calcTotalFor
(aDetail)
<<description>>
<<description>>
<<party>> PartyDescription <<place>>
PlaceDescription
Party Place
type
type
serialNumber description serialNumber
description
name itemNumber name
itemNumber
address defaultValue address
defaultValue
customValue 0..* 1 assessWithPlugInElseDefault customValue 0..* 1
assessWithPlugInElseDefault
assess assessAcrossParties assess
assessAcrossPlaces
assessAcrossRoles findAvailable assessAcrossRoles
findAvailable
getCustomElseDefaultValue calcQtyAvailable getCustomElseDefaultValue
Interacts with its calcQtyAvailable
listRoles calcTotalFor listRoles
yellow roles or its calcTotalFor
listParties listParties listPlaces
pink moment-intervals listPlaces
assessAcrossParties listDescs assessAcrossPlaces
listDescs
1 assessAcrossDescs
1 assessAcrossDescs
Interacts with its
green parties or
its pink moment- 0..1
intervals
interface 0..1 0..1
0..1
<<plug-in point>>
<<role>> interface
<<role>> IAssess
PlaceRole <<plug-in point>>
Interacts PartyRole
with its pink assess assignedNumber IAssess
assignedNumber
moment-intervals status
status assess
<<moment-interval>> assessAcrossMIs
assessAcrossMIs
MomentInterval 0..* 1 listMIs
listMIs 1 0..*
listRoles
listRoles number
assessAcrossRoles
assessAcrossRoles dateOrDateTimeOrInterval
priority
total
status
makeMomentInterval
<<moment-interval>> 1 0..* <<moment-interval>>
1 0..* addDetail
PriorMI NextMI
calcTotal
assess
recalcTotal
complete
cancel
<<description>>
Interacts mi_generateNext
<<thing>> ThingDescription
- With its pink mi-details mi_assessWRTPrior
Thing type
- With its pink prior moment-intervals mi_assessWRTNext
- With its pink next moment-intervals serialNumber description
mi_comparePlanVsActual 0..*
- With its coresponding yellow roles, name itemNumber
listMIs actual
green party/place/things, or address defaultValue
assessAcrossMIs
blue descriptions assessWithPlugInElseDefault
customValue 0..* 1
1 0..1 plan assessAcrossThings
assess
assessAcrossRoles findAvailable
getCustomElseDefaultValue calcQtyAvailable
1
listRoles calcTotalFor
interface
listThings listThings
<<plug-in point>>
assessAcrossThings listDescs
IMakeMomentInterval
assessAcrossDescs
1
makeMomentInterval
0..1 0..1
<<role>> interface
1..*
ThingRole <<plug-in point>>
<<mi-detail>> IAssess
assignedNumber
0..* 0..*
MomentIntervalDetail
status
qty assess
assessAcrossMIs
calcTotal
listMIs
listRoles
assessAcrossRoles
1: makeMomentInterval
<<description>>
<<description>>
<<party>> PartyDescription <<place>>
PlaceDescription
Party Place
type
type
serialNumber description serialNumber
description
name itemNumber name
itemNumber
address defaultValue address
defaultValue
customValue 0..* 1 assessWithPlugInElseDefault customValue 0..* 1
assessWithPlugInElseDefault
assess assessAcrossParties assess
assessAcrossPlaces
assessAcrossRoles findAvailable assessAcrossRoles
findAvailable
getCustomElseDefaultValue calcQtyAvailable getCustomElseDefaultValue
Interacts with its calcQtyAvailable
listRoles calcTotalFor listRoles
yellow roles or its calcTotalFor
listParties listParties listPlaces
pink moment-intervals listPlaces
assessAcrossParties listDescs assessAcrossPlaces
listDescs
1 assessAcrossDescs
1 assessAcrossDescs
Interacts with its
green parties or
its pink moment- 0..1
intervals
interface 0..1 0..1
0..1
<<plug-in point>>
<<role>> interface
<<role>> IAssess
PlaceRole <<plug-in point>>
Interacts PartyRole
with its pink assess assignedNumber IAssess
assignedNumber
moment-intervals status
status assess
<<moment-interval>> assessAcrossMIs
assessAcrossMIs
MomentInterval 0..* 1 listMIs
listMIs 1 0..*
listRoles
listRoles number
assessAcrossRoles
assessAcrossRoles dateOrDateTimeOrInterval
priority
total
status
makeMomentInterval
<<moment-interval>> 1 0..* <<moment-interval>>
1 0..* addDetail
PriorMI NextMI
calcTotal
assess
recalcTotal
complete
cancel
<<description>>
Interacts mi_generateNext
<<thing>> ThingDescription
- With its pink mi-details mi_assessWRTPrior
Thing type
- With its pink prior moment-intervals mi_assessWRTNext
- With its pink next moment-intervals serialNumber description
mi_comparePlanVsActual 0..*
- With its coresponding yellow roles, name itemNumber
listMIs actual
green party/place/things, or address defaultValue
assessAcrossMIs
blue descriptions assessWithPlugInElseDefault
customValue 0..* 1
1 0..1 plan assessAcrossThings
assess
assessAcrossRoles findAvailable
getCustomElseDefaultValue calcQtyAvailable
1
listRoles calcTotalFor
interface
listThings listThings
<<plug-in point>>
assessAcrossThings listDescs
IMakeMomentInterval
assessAcrossDescs
1
makeMomentInterval
0..1 0..1
<<role>> interface
1..*
ThingRole <<plug-in point>>
<<mi-detail>> IAssess
assignedNumber
0..* 0..*
MomentIntervalDetail
status
qty assess
assessAcrossMIs
calcTotal
listMIs
listRoles
assessAcrossRoles
1: mi_assessWRTNext
FOR each
2: assess
subsequent
moment-interval
<<description>>
<<description>>
<<party>> PartyDescription <<place>>
PlaceDescription
Party Place
type
type
serialNumber description serialNumber
description
name itemNumber name
itemNumber
address defaultValue address
defaultValue
customValue 0..* 1 assessWithPlugInElseDefault customValue 0..* 1
assessWithPlugInElseDefault
assess assessAcrossParties assess
assessAcrossPlaces
assessAcrossRoles findAvailable assessAcrossRoles
findAvailable
getCustomElseDefaultValue calcQtyAvailable getCustomElseDefaultValue
Interacts with its calcQtyAvailable
listRoles calcTotalFor listRoles
yellow roles or its calcTotalFor
listParties listParties listPlaces
pink moment-intervals listPlaces
assessAcrossParties listDescs assessAcrossPlaces
listDescs
1 assessAcrossDescs
1 assessAcrossDescs
Interacts with its
green parties or
its pink moment- 0..1
intervals
interface 0..1 0..1
0..1
<<plug-in point>>
<<role>> interface
<<role>> IAssess
PlaceRole <<plug-in point>>
Interacts PartyRole
with its pink assess assignedNumber IAssess
assignedNumber
moment-intervals status
status assess
<<moment-interval>> assessAcrossMIs
assessAcrossMIs
MomentInterval 0..* 1 listMIs
listMIs 1 0..*
listRoles
listRoles number
assessAcrossRoles
assessAcrossRoles dateOrDateTimeOrInterval
priority
total
status
makeMomentInterval
<<moment-interval>> 1 0..* <<moment-interval>>
1 0..* addDetail
PriorMI NextMI
calcTotal
assess
recalcTotal
complete
cancel
<<description>>
Interacts mi_generateNext
<<thing>> ThingDescription
- With its pink mi-details mi_assessWRTPrior
Thing type
- With its pink prior moment-intervals mi_assessWRTNext
- With its pink next moment-intervals serialNumber description
mi_comparePlanVsActual 0..*
- With its coresponding yellow roles, name itemNumber
listMIs actual
green party/place/things, or address defaultValue
assessAcrossMIs
blue descriptions assessWithPlugInElseDefault
customValue 0..* 1
1 0..1 plan assessAcrossThings
assess
assessAcrossRoles findAvailable
getCustomElseDefaultValue calcQtyAvailable
1
listRoles calcTotalFor
interface
listThings listThings
<<plug-in point>>
assessAcrossThings listDescs
IMakeMomentInterval
assessAcrossDescs
1
makeMomentInterval
0..1 0..1
<<role>> interface
1..*
ThingRole <<plug-in point>>
<<mi-detail>> IAssess
assignedNumber
0..* 0..*
MomentIntervalDetail
status
qty assess
assessAcrossMIs
calcTotal
listMIs
listRoles
assessAcrossRoles
1: getCustomElseDefaultValue
IF it has a
2: 'getCustomValue'
custom value,
use it
OTHERWISE
3: 'getDefaultValue'
use the default
value instead
<<description>>
<<description>>
<<party>> PartyDescription <<place>>
PlaceDescription
Party Place
type
type
serialNumber description serialNumber
description
name itemNumber name
itemNumber
address defaultValue address
defaultValue
customValue 0..* 1 assessWithPlugInElseDefault customValue 0..* 1
assessWithPlugInElseDefault
assess assessAcrossParties assess
assessAcrossPlaces
assessAcrossRoles findAvailable assessAcrossRoles
findAvailable
getCustomElseDefaultValue calcQtyAvailable getCustomElseDefaultValue
Interacts with its calcQtyAvailable
listRoles calcTotalFor listRoles
yellow roles or its calcTotalFor
listParties listParties listPlaces
pink moment-intervals listPlaces
assessAcrossParties listDescs assessAcrossPlaces
listDescs
1 assessAcrossDescs
1 assessAcrossDescs
Interacts with its
green parties or
its pink moment- 0..1
intervals
interface 0..1 0..1
0..1
<<plug-in point>>
<<role>> interface
<<role>> IAssess
PlaceRole <<plug-in point>>
Interacts PartyRole
with its pink assess assignedNumber IAssess
assignedNumber
moment-intervals status
status assess
<<moment-interval>> assessAcrossMIs
assessAcrossMIs
MomentInterval 0..* 1 listMIs
listMIs 1 0..*
listRoles
listRoles number
assessAcrossRoles
assessAcrossRoles dateOrDateTimeOrInterval
priority
total
status
makeMomentInterval
<<moment-interval>> 1 0..* <<moment-interval>>
1 0..* addDetail
PriorMI NextMI
calcTotal
assess
recalcTotal
complete
cancel
<<description>>
Interacts mi_generateNext
<<thing>> ThingDescription
- With its pink mi-details mi_assessWRTPrior
Thing type
- With its pink prior moment-intervals mi_assessWRTNext
- With its pink next moment-intervals serialNumber description
mi_comparePlanVsActual 0..*
- With its coresponding yellow roles, name itemNumber
listMIs actual
green party/place/things, or address defaultValue
assessAcrossMIs
blue descriptions assessWithPlugInElseDefault
customValue 0..* 1
1 0..1 plan assessAcrossThings
assess
assessAcrossRoles findAvailable
getCustomElseDefaultValue calcQtyAvailable
1
listRoles calcTotalFor
interface
listThings listThings
<<plug-in point>>
assessAcrossThings listDescs
IMakeMomentInterval
assessAcrossDescs
1
makeMomentInterval
0..1 0..1
<<role>> interface
1..*
ThingRole <<plug-in point>>
<<mi-detail>> IAssess
assignedNumber
0..* 0..*
MomentIntervalDetail
status
qty assess
assessAcrossMIs
calcTotal
listMIs
listRoles
assessAcrossRoles
1: findAvailable
FOR each
2: assess
thing
FOR each
3: assessAcrossMIs
role
<<description>>
<<description>>
<<party>> PartyDescription <<place>>
PlaceDescription
Party Place
type
type
serialNumber description serialNumber
description
name itemNumber name
itemNumber
address defaultValue address
defaultValue
customValue 0..* 1 assessWithPlugInElseDefault customValue 0..* 1
assessWithPlugInElseDefault
assess assessAcrossParties assess
assessAcrossPlaces
assessAcrossRoles findAvailable assessAcrossRoles
findAvailable
getCustomElseDefaultValue calcQtyAvailable getCustomElseDefaultValue
Interacts with its calcQtyAvailable
listRoles calcTotalFor listRoles
yellow roles or its calcTotalFor
listParties listParties listPlaces
pink moment-intervals listPlaces
assessAcrossParties listDescs assessAcrossPlaces
listDescs
1 assessAcrossDescs
1 assessAcrossDescs
Interacts with its
green parties or
its pink moment- 0..1
intervals
interface 0..1 0..1
0..1
<<plug-in point>>
<<role>> interface
<<role>> IAssess
PlaceRole <<plug-in point>>
Interacts PartyRole
with its pink assess assignedNumber IAssess
assignedNumber
moment-intervals status
status assess
<<moment-interval>> assessAcrossMIs
assessAcrossMIs
MomentInterval 0..* 1 listMIs
listMIs 1 0..*
listRoles
listRoles number
assessAcrossRoles
assessAcrossRoles dateOrDateTimeOrInterval
priority
total
status
makeMomentInterval
<<moment-interval>> 1 0..* <<moment-interval>>
1 0..* addDetail
PriorMI NextMI
calcTotal
assess
recalcTotal
complete
cancel
<<description>>
Interacts mi_generateNext
<<thing>> ThingDescription
- With its pink mi-details mi_assessWRTPrior
Thing type
- With its pink prior moment-intervals mi_assessWRTNext
- With its pink next moment-intervals serialNumber description
mi_comparePlanVsActual 0..*
- With its coresponding yellow roles, name itemNumber
listMIs actual
green party/place/things, or address defaultValue
assessAcrossMIs
blue descriptions assessWithPlugInElseDefault
customValue 0..* 1
1 0..1 plan assessAcrossThings
assess
assessAcrossRoles findAvailable
getCustomElseDefaultValue calcQtyAvailable
1
listRoles calcTotalFor
interface
listThings listThings
<<plug-in point>>
assessAcrossThings listDescs
IMakeMomentInterval
assessAcrossDescs
1
makeMomentInterval
0..1 0..1
<<role>> interface
1..*
ThingRole <<plug-in point>>
<<mi-detail>> IAssess
assignedNumber
0..* 0..*
MomentIntervalDetail
status
qty assess
assessAcrossMIs
calcTotal
listMIs
listRoles
assessAcrossRoles
1: assess assessWithPlugInElseDefault
2: assessWithPlugInElseDefault (aThing)
IF there is
3: assess assess
a plug-in,
use it (aThing)
4: 'gets,sets'
5: 'defaultAlgorithm'
ELSE
use the default
algorithm
ProductSale Shipment
ProductSale Shipment
<<moment-interval>> <<moment-interval>>
ProductSale 0..* 0..* Shipment
assessTimelinessOfShipments assessTimeliness
doesDateMeetDueDate wasShippedBeforeDueDate
1: assessTimelinessOfShipments
FOR each
2: assessTimeliness
shipment
1: wasShippedBeforeDueDate
FOR each
2: doesDateMeetDueDate
product
sale
ProductSale Shipment
ProductSale Shipment
IProductSale IShipment
interface <<moment-interval>>
<<plug-in point>> Shipment
0..*
IProductSale
assessTimeliness
doesDateMeetDueDate wasShippedBeforeDueDate
<<moment-interval>> interface
ProductSale <<plug-in point>>
0..*
IShipment
assessTimelinessOfIShipments
doesDateMeetDueDate assessTimeliness
1: wasShippedBeforeDueDate
FOR each
2: doesDateMeetDueDate
IProductSale
implementer
1: assessTimelinessOfShipments
FOR each
2: assessTimeliness
IShipment
implementer
Use as-is.
Extend a component by plugging in new capabilities at the plug-
in points.
Extend by adding additional content.
InventoryMgmt
1.10 SUMMARY
This chapter introduced enterprise-component modeling using color.
In practice, we have developed enterprise-model components and a
process for building, applying, and adapting those components. Along
the way, weve discovered that encoding added layers of information
(roles, moment-intervals, things, and descriptions) was an essential ingre-
dient for both building and reading component models; we found that
color was especially suitable for adding these layers of information.
Component modeling with color is so effective that we expect that
we will never again return to the monotonous flatland of monochrome
modeling.
So get a set of four-color Post-it Notes and try this out for yourself.
Take an existing model you are working onor start with a new one, if
you wish. Add stickers for the pink moment-intervals; the yellow roles;
Archetypes, Color, and the Domain-Neutral Component 29
the green parties, places, or things; and blue descriptions. Then stand back
and check it out. Discuss it with a colleague. Walk through it with a
domain expert.
Or, if you already have a large model, get a set of color highlighting
pens (pink, yellow, green, and blue) and highlight the class names in your
model. This is another good way to get started.
REFERENCES
Color and Visualization
[Chijiiwa87] Chijiiwa, Hideaki, Color Harmony. Cincinnati: Rockport
Publishers, 1987.
[Gardner83] Gardner, Howard, Frames of Mind: The Theory of Multiple
Intelligences. New York: Basic Books, 1983.
The Elements of Color. New York: Van Nostrand Reinhold, 1970.
[Root-Bernstein85] Root-Bernstein, Robert Scott, Visual Thinking: The Art of
Imagining Reality. Transactions of the American Philosophical Society,
Volume 75, 1985.
[Tufte90] Tufte, Edward R., Envisioning Information. Cheshire, CT: Graphics
Press, 1990.
Walker, Morton, The Power of Color. Garden City Park, NY: Avery, 1991.
[Wilcox94] Wilcox, Michael, Blue and Yellow Dont Make Green, Revised
Edition. Cincinnati: North Light Books, 1994.
Modeling
Booch, Grady, with James Rumbaugh and Ivar Jacobson, UML User Guide.
Reading, MA: Addison Wesley, 1999.
[Coad97a] Coad, Peter, Boundary; Colors; Timeline; Status. The Coad
Letter. Object International (www.oi.com), September 30, 1997.
[Coad97b] Coad, Peter, How to Build Better Object Models. Tutorial.
OOPSLA, Atlanta, October 1997.
[Coad92] Coad, Peter, and Mayfield, Mark, Object-Oriented Patterns.
Communications of the ACM. September 1992.
[Coad95-97] Coad, Peter with Mark Mayfield and David North, Object
Models: Strategies, Patterns, and Applications. Second Edition. Upper
Saddle River, NJ: Prentice Hall, 1997.
Curran, Thomas, and Gerhard Keller with Andrew Ladd, SAP R/3 Business
Blueprint. Upper Saddle River, NJ: Prentice Hall, 1998.
Fowler, Martin, Analysis Patterns. Reading, MA: Addison Wesley, 1996.
Fowler, Martin, with Kendall Scott, UML Distilled. Reading, MA: Addison
Wesley, 1997.
Gamma, Erich, Richard Helm, Ralph Johnson, and John Vlissides, Design
Patterns. Reading, MA: Addison Wesley, 1995.
[Hayakawa68] Hayakawa, S.I., Editor, Use the Right Word. Now published
under the title Choose the Right Word. Pleasantville, NY: Readers
Digest, 1968.
[Webster78] Websters New Twentieth Century Dictionary. New York: Collins
World, 1978.