UML Weekend Crash Course⢠- To Parent Directory
UML Weekend Crash Course⢠- To Parent Directory UML Weekend Crash Course⢠- To Parent Directory
Session 1—What Is the UML 7 Table 1-1 The UML Four-layer Metamodel Architecture Layer Description Example metametamodel Defines the language for Defines the concepts MetaClass, specifying metamodels. MetaAttribute, MetaOperation, and so on. metamodel Defines the language for Defines the concepts Class, specifying a model. Attribute, Operation, Component, and so on. model Defines the language to use Defines the concepts Order, to describe a subject domain. Shipment, Product, Product ID, Buy(), and so on. user objects Defines specific subject Defines Order #74653, Shipment domain information. #87649, the product “CD-ROM 435”, the price $50.00, and so on. Starting from the bottom and working up, the user object layer is where you find a diagram, like a Sequence diagram or Object diagram, populated with the facts from the problem domain like Order #74653 that contains a line item for “CD-ROM 435” with a price of $50.00. The diagram is built following the rules defined by the next layer above it, the model layer. The model layer fully explains the classes that describe the subject domain objects, for example, classes like Order, Shipment, and Product. It tells you what an Order looks like, the fields it contains, the operations it can perform, and so on, without ever telling you about any particular Order. These class definitions conform to the rules specified in the next layer above, the metamodel (2M) layer. The metamodel (2M) layer defines what a class is so that the model layer knows how to describe the Order class. It defines a class as a concept having attributes, operations, and associations. It defines an attribute as having a name, a data type, a default value, and constraints. These definitions in turn conform to the specifications of the metametamodel (3M). The metametamodel (3M) layer is the realm of the philosophers and practitioners of the black arts who determine what makes up a language. Nearly all the definitions at this layer are abstract, that is, they are more like templates that can be used to build a wide variety of concrete concepts. In case I managed to scare you just now, relax, all you really need to know is the metamodel. That is what this entire course is about, defining the diagrams and the elements used to construct them. Once you understand the diagrams defined by the metamodel layer, you will get enough practice building the model and user object layers to become quite comfortable. The organization of the metamodel The metamodel is a bit complex, so it helps to organize the elements into packages. A package is basically the UML version of a directory, a place to put things. At the first level you
8 Friday Evening will find three packages called the Foundation, Model Management, and Behavioral Elements packages, as shown in Figure 1-1. Behavioral Elements Foundation Model Management Figure 1-1 Packages of the UML metamodel Figure 1-1 shows that Behavioral Elements and Model Management depend on the Foundation package. In other words, they won’t work properly if they don’t get help from the contents of the Foundation package (more on the Foundation package in a moment). The Behavioral Elements package contains everything you need to model behavior like Use Cases, Collaborations, Statecharts, and more. Model Management explains how to model packages, subsystems, and similar organizational structures. Figure 1-2 represents the contents of the Foundation package. The Foundation package contains four more packages, the CORE, Auxiliary Elements, Data Types, and Extension Mechanisms packages. Auxiliary Elements Core Extension Mechanisms Data Types Figure 1-2 The contents of the Foundation package The Core package defines all the fundamental concepts used in the UML diagrams like Class, Interface, Association, and Data Type. But it also defines some abstract concepts like GeneralizableElement, a high level definition for anything that can implement inheritance, like a class, a Use Case, an actor, and more. The other three packages support the Core package with items like dependencies; primitive data types like integer, string, and time; and some built-in extension mechanisms that I’ll talk about next. UML Extension Mechanisms The UML also provides some built-in extensions to the diagram notations. One such tool is called a stereotype. A stereotype appears inside of > (guillemets) and characterizes a type of element like a class or relationship without specifying its implementation. For example, you might stereotype a number of classes as to convey that
- Page 1 and 2: UML WEEKEND CRASH COURSE THOMAS A.
- Page 4 and 5: UML Weekend Crash Course Thomas A.
- Page 6 and 7: About the Author Tom Pender is the
- Page 8: With thanks to Lynne Angeloro for h
- Page 11 and 12: x Preface To get the most out of th
- Page 13 and 14: xii Preface Features First, as you
- Page 15 and 16: Part VI—Sunday Afternoon ........
- Page 17 and 18: xvi Contents Encapsulation ........
- Page 19 and 20: xviii Contents Modeling the Class C
- Page 21 and 22: xx Contents Session 22-Modeling the
- Page 24: UML Weekend Crash Course
- Page 27 and 28: PART I Friday Evening Session 1 Wha
- Page 29: 6 Friday Evening The UML is a stand
- Page 33 and 34: 10 Friday Evening The Continuing Re
- Page 36 and 37: SESSION 2 UML and Development Metho
- Page 38 and 39: Session 2—UML and Development Met
- Page 40 and 41: Session 2—UML and Development Met
- Page 42 and 43: Session 2—UML and Development Met
- Page 44 and 45: Session 2—UML and Development Met
- Page 46 and 47: SESSION 3 How to Approach the UML S
- Page 48 and 49: Session 3—How to Approach the UML
- Page 50 and 51: Session 3—How to Approach the UML
- Page 52 and 53: Session 3—How to Approach the UML
- Page 54 and 55: Session 3—How to Approach the UML
- Page 56: Session 3—How to Approach the UML
- Page 59 and 60: 36 Friday Evening Remember to pay c
- Page 61 and 62: 38 Friday Evening Constraints The s
- Page 63 and 64: 40 Friday Evening An Inventory Cont
- Page 65 and 66: 42 Friday Evening Performance How
- Page 67 and 68: 44 Friday Evening In the effort to
- Page 70 and 71: Part II — Saturday Morning Sessio
- Page 72 and 73: SESSION 5 Understanding the Use Cas
- Page 74 and 75: Session 5—Understanding the Use C
- Page 76 and 77: Session 5—Understanding the Use C
- Page 78 and 79: Session 5—Understanding the Use C
8<br />
Friday Evening<br />
will find three packages called the Foundation, Model Management, and Behavioral Elements<br />
packages, as shown in Figure 1-1.<br />
Behavioral Elements Foundation Model Management<br />
Figure 1-1 Packages of the <strong>UML</strong> metamodel<br />
Figure 1-1 shows that Behavioral Elements and Model Management depend on the<br />
Foundation package. In other words, they won’t work properly if they don’t get help from<br />
the contents of the Foundation package (more on the Foundation package in a moment).<br />
The Behavioral Elements package contains everything you need to model behavior like<br />
Use Cases, Collaborations, Statecharts, and more.<br />
Model Management explains how to model packages, subsystems, and similar organizational<br />
structures.<br />
Figure 1-2 represents the contents of the Foundation package. The Foundation package<br />
contains four more packages, the CORE, Auxiliary Elements, Data Types, and Extension<br />
Mechanisms packages.<br />
Auxiliary Elements<br />
Core<br />
Extension Mechanisms<br />
Data Types<br />
Figure 1-2 The contents of the Foundation package<br />
The Core package defines all the fundamental concepts used in the <strong>UML</strong> diagrams like<br />
Class, Interface, Association, and Data Type. But it also defines some abstract concepts like<br />
GeneralizableElement, a high level definition for anything that can implement inheritance,<br />
like a class, a Use Case, an actor, and more.<br />
The other three packages support the Core package with items like dependencies; primitive<br />
data types like integer, string, and time; and some built-in extension mechanisms that<br />
I’ll talk about next.<br />
<strong>UML</strong> Extension Mechanisms<br />
The <strong>UML</strong> also provides some built-in extensions to the diagram notations. One such tool is<br />
called a stereotype. A stereotype appears inside of > (guillemets) and characterizes a<br />
type of element like a class or relationship without specifying its implementation. For<br />
example, you might stereotype a number of classes as to convey that