Smalltalk and Object Orientation: an Introduction - Free
Smalltalk and Object Orientation: an Introduction - Free
Smalltalk and Object Orientation: an Introduction - Free
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
20. More <strong>Object</strong> Modeling Technique<br />
20.1 <strong>Introduction</strong><br />
This chapter continues from where the last chapter finished. It describes the dynamic <strong><strong>an</strong>d</strong> functional<br />
models of the <strong>an</strong>alysis phase as well as the design <strong><strong>an</strong>d</strong> implementation phases.<br />
20.2 Dynamic models<br />
The dynamic models of the <strong>an</strong>alysis phase capture the behavior of the system being <strong>an</strong>alyzed. That is<br />
they describe what states the system c<strong>an</strong> be in <strong><strong>an</strong>d</strong> what causes a state ch<strong>an</strong>ge to occur.<br />
20.2.1 Dynamic modeling<br />
The dy namic model describes the behavior of the application <strong><strong>an</strong>d</strong> the objects which comprise that<br />
application. The sequence, collaboration <strong><strong>an</strong>d</strong> state diagrams described in the last chapter are the main<br />
components of the dynamic model. OMT uses the term event trace to me<strong>an</strong> a sequence diagram <strong><strong>an</strong>d</strong><br />
event flow to me<strong>an</strong> a collaboration diagram (in UML terms).<br />
The aim of the dynamic model <strong>an</strong>alysis is to identify the import<strong>an</strong>t events which occur <strong><strong>an</strong>d</strong> their<br />
effects on the state of the objects. Thus the first step in this phase is the identification of events <strong><strong>an</strong>d</strong> the<br />
objects associated with those events. Next the sequence in which those events occur must be identified<br />
which allows a state diagram to be drawn.<br />
OMT recommends the following steps are performed in the construction of a dynamic model:<br />
1. Prepare scenarios of typical interaction sequences.<br />
2. Identify events between objects.<br />
3. Prepare <strong>an</strong> event trace (sequence diagram <strong><strong>an</strong>d</strong> collaboration diagram) for each scenario.<br />
4. Build a state diagram.<br />
5. Match events between objects to verify consistency.<br />
20.2.1.1 Prepare scenarios<br />
Scenarios illustrate the major interactions between the system <strong><strong>an</strong>d</strong> external actors on that system<br />
(whether hum<strong>an</strong> or otherwise). These scenarios are essentially the use cases in the use case model, if<br />
this has been performed. If not it is necessary to consider the different ways in which the system will be<br />
used <strong><strong>an</strong>d</strong> to determine the likely interactions. The scenarios c<strong>an</strong> be written down as sequences of steps<br />
which describe one path through the systems. You should first prepare sc enarios for the normal system<br />
interaction <strong><strong>an</strong>d</strong> then for exceptional system interaction.<br />
20.2.1.2 Identify events between objects<br />
The scenarios essentially document external events between the system <strong><strong>an</strong>d</strong> the actor(s). These events<br />
should trigger internal events betw een the objects in the system. You should trace these events through<br />
the system, noting the objects involved <strong><strong>an</strong>d</strong> the types of events occurring. Having obtained sets of events<br />
you should group together events which have the same effect (even if they have di fferent parameters).<br />
For example, <strong>an</strong> event to close a file has the same effect whichever file is being closed!<br />
162