Smalltalk and Object Orientation: an Introduction - Free
Smalltalk and Object Orientation: an Introduction - Free
Smalltalk and Object Orientation: an Introduction - Free
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
In the remainder of this chapter we consider how the UML c<strong>an</strong> represent the class, objects,<br />
relationships <strong><strong>an</strong>d</strong> attributes in <strong>an</strong> object oriented system. The next chapter considers sequence <strong><strong>an</strong>d</strong><br />
collaboration diagrams, State diagrams <strong><strong>an</strong>d</strong> deployment diagrams.<br />
17.2 The UML Infrastructure<br />
The UML is built upon a common metamodel which defines the sem<strong>an</strong>tics of the l<strong>an</strong>guage. On top of<br />
this is a common notation which interprets these sem<strong>an</strong>tics in <strong>an</strong> easily (hum<strong>an</strong>) comprehensible<br />
m<strong>an</strong>ner. Each of these is discussed below.<br />
17.2.1 The Metamodel<br />
A metamodel describes the constituents of a model <strong><strong>an</strong>d</strong> its relationships. That is, it is a model (in its<br />
own right) which documents how <strong>an</strong>other model c<strong>an</strong> be defined. S uch models are import<strong>an</strong>t because<br />
they provide a single, common <strong><strong>an</strong>d</strong> unambiguous statement of the syntax <strong><strong>an</strong>d</strong> sem<strong>an</strong>tics of a model. It<br />
thus allows CASE tool builders to do more th<strong>an</strong> provide diagramming tools. In fact the metamodel<br />
serves several purposes including:<br />
• Defining the syntax <strong><strong>an</strong>d</strong> describing the sem<strong>an</strong>tics of the UML’s concepts.<br />
• Providing a (reasonably) formal basis for the UML.<br />
• Providing a description of the elements of the UML.<br />
• Providing the basis for the interch<strong>an</strong>ge of models between vendors’ tools.<br />
In the normal course of events a user of the UML (or indeed of a tool which supports the UML) need<br />
never know <strong>an</strong>ything about the metamodel. It should be, <strong><strong>an</strong>d</strong> is, hidden from sight. However, for the<br />
developers of the UML <strong><strong>an</strong>d</strong> for tool vendors in general it is a valuable, indeed essential, feature.<br />
At present the UML metamodel is defined in terms of the UML <strong><strong>an</strong>d</strong> textual <strong>an</strong>notations (although<br />
this may appear infinitely recursive, it is possible). Work on the metamodel is still progressing with the<br />
authors of the UML attempting to make it more formal <strong><strong>an</strong>d</strong> simpler.<br />
17.2.2 The UML models<br />
The UML defines a number of models <strong><strong>an</strong>d</strong> the notations to be used with these models. They are:<br />
Use case diagrams. These diagrams are based on the use case diagrams of <strong>Object</strong>ory <strong><strong>an</strong>d</strong> org<strong>an</strong>iz e<br />
the use cases that encompass a system’s behavior.<br />
Class diagrams . These are derived form the Booch <strong><strong>an</strong>d</strong> OMT methods <strong><strong>an</strong>d</strong> express the static<br />
structure of the system. For example the part of <strong><strong>an</strong>d</strong> is a relationships between classes <strong><strong>an</strong>d</strong><br />
objects. Note that the c lass diagrams also encompass the object diagrams. Therefore, in this<br />
book, we will refer to them as the object model following the name used in OMT.<br />
State machine diagrams . These, like those in OMT, are based on statecharts. They capture the<br />
dynamic behavior of the system.<br />
Sequence diagrams. Sequence diagrams (formerly known as message-trace diagrams in version 0.8<br />
of the Unified method draft) deal with the time ordered sequence of tr<strong>an</strong>sactions between<br />
objects.<br />
Collaboration diagrams. Collaboration diagrams (previously known as <strong>Object</strong> -message diagrams)<br />
indicate the order of messages between specified objects. They are complementary to sequence<br />
diagrams as they both illustrate the same information. The difference is that the sequence<br />
diagrams hi -light the act ual sequence, while the collaboration diagrams hi -light the structure<br />
required to support the message sequences.<br />
Component diagrams . In version 0.8 of the Unified Method draft these diagrams were called<br />
module diagrams. These diagrams represent the develop ment view of the system or how the<br />
system should be developed into software modules. They c<strong>an</strong> also be used to represent concepts<br />
such as dynamic libraries.<br />
138