3.2 Use UML Diagrams as a Base


When starting a new model, the first step is to build a number of diagrams. The most important diagram in the model is the class diagram. Because any model is structured around classes or components , this is where all information in the model is focused. The use of OCL strongly relies on the types (classes, datatypes, and so on) defined in a UML class diagram. This diagram should be built first. Other diagrams can be built according to need and taste.

The second step is to identify where the need for explicitly stating extra information lies. Following are some of the obvious situations that call for additional information:

  • Elements might be underspecified; for instance, when an attribute has been defined as derived , but no derivation rule is given.

  • Business rules must be incorporated into the model. This will result in a number of invariants, as shown in [Eriksson00].

  • There is a need for a more precise definition of the interfaces in the system. This calls for the introduction of pre- and postconditions to operations.

  • Finally, some aspects of the diagrams might be ambiguous without stating invariants.

The following sections describe a number of situations in which adding expressions to the diagrams is necessary to obtain a complete and unambiguous model.



Object Constraint Language, The. Getting Your Models Ready for MDA
The Object Constraint Language: Getting Your Models Ready for MDA (2nd Edition)
ISBN: 0321179366
EAN: 2147483647
Year: 2003
Pages: 137

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