11.4 UML

UML (OMG documents formal/2001-09-67) is the standard modeling language at the M2 level, defined using the MOF. A vast majority of the models that are being developed are UML models. To be able to use MDA in software development, it is therefore necessary to understand UML.

11.4.1 The UML Metamodel

UML is the most widely used modeling language defined in the MOF. Figure 11-4 shows an extension of the UML metamodel used in Chapter 9 and Chapter 10. It is still a small and simplified part of the standard metamodel, describing only part of the language. The UML metamodel describes exactly how a UML model is structured. From the metamodel, we can deduce the following:

  • At the top we see that everything in UML is a ModelElement and has a " name ."

  • The abstract metaclass Classifier is a generalization of Class, Interface, and DataType. They have much in common, but some specifics as well.

  • A Class may implement an Interface, but a DataType or an Interface may not.

  • A Feature (Attribute, AssociationEnd or Operation) is part of exactly one Classifier; it can never be part of multiple Classifiers.

  • An association has a minimum of two association-ends, but may have more.

  • An operation may have zero or more parameters.

Figure 11-4. UML metamodel (simplified)

graphics/11fig04.gif

Any UML model must fulfill these rules; otherwise , it is not a proper instance of the UML metamodel. Because of this, we can reason about UML models knowing exactly what they look like and how they are structured.

Relationship between UML and the MOF

The UML metamodel is an instance of the MOF model. In Figure 8-5 in Chapter 8, a small part of the UML metamodel is shown as an instance model, with each class in the UML metamodel being an instance of a MOF class. More commonly, the UML metamodel is shown as a model itself, as in Figure 11-4.

Additionally, the UML metamodel has the same structure as the MOF model, reusing part of its definition. Because UML is used to model much more than metamodels only, it contains many more metaclasses than the MOF. Examples of this are the metaclasses needed for statecharts, interactions, and so on, in UML.

11.4.2 The Role of UML in MDA

There are two different ways in which UML can be applied in MDA. First, a developer must be able to use UML to create a model of the system that will be built. He should know how and where to apply the UML language to develop models that are precise and consistent enough to be used within MDA. There are many books available that give information on how to use UML for this purpose.

A special and much smaller group of developers will have the task to define transformations between models. This group does not develop a model of a particular system, but instead defines transformations to be used for many models, models of many different systems. We will call these people metadevelopers. Like a developer, a metadeveloper must have a thorough understanding of the UML language and its usage. Additionally, he needs to be intimately familiar with the UML metamodel. It is in terms of this metamodel that he or she will need to define the MDA transformations.



MDA Explained. The Model Driven Architecture(c) Practice and Promise 2003
Project Leadership (The Project Management Essential Library)
ISBN: N/A
EAN: 2147483647
Year: 2004
Pages: 118

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