In Section 1.2.3, you learned the building blocks of the MDA framework: models, languages, transformation definitions, and transformation tools. As shown in Figure 5-1, OCL is very helpful in creating at least three of the building blocks:
Figure 5-1. Use of OCL in the MDA framework
How to build better models using OCL has been the subject of this book so far. In this chapter, we focus on the second and third aspect of these building blocks: the definition of transformations and modeling languages. For this, we must get to know the metalevel of modeling. This chapter introduces metamodels and metamodeling; explains the UML and OCL metamodels; shows how OCL has helped in the development of these metamodels; and provides an example of a transformation definition written in OCL. |