- Shopping Bag ( 0 items )
Praise for The Object Constraint Language, Second Edition
“MDA promises a revolution in the way we develop software. This book is essential reading for anyone intending to adopt MDA technology.”
—Tony Clark, PhD
King’s College, London
“Through examples, Jos and Anneke demonstrate the power and intuitiveness of OCL, and the key role that this language plays in implementing and promoting MDA. The theme, structure, contents, and, not lastly, the clarity of explanations recommend this book as the best advocate for learning, using, and promoting OCL, UML, and MDA. I am sure that this work will contribute in a significant manner to the development and widespread use of new software technologies.”
Head of the Computer Science Research Laboratory
Babes-Bolyai University, Cluj
"In this thoroughly revised edition, Jos and Anneke offer a concise, pragmatic, and pedagogic explanation of the Object Constraint Language (OCL) and its different applications. Their discussion of OCL's potential role in Model Driven Architecture (MDA) is timely and offers great insight into the way that UML can be taken to the next level of automated software development practice. I highly recommend this book to anyone who is looking to get the most out of UML."
—Shane Sendall, PhD, Senior Researcher, Swiss Federal Institute of Technology in Lausanne
The release of Unified Modeling Language (UML) 2.0 places renewed emphasis on the Object Constraint Language (OCL). Within UML, OCL is the standard for specifying expressions that add vital information to object-oriented models and other object-modeling artifacts. Model Driven Architecture (MDA) relies on OCL to add the level of programming detail necessary to enable platform-specific models (PSM) to communicate with platform-independent models (PIM).
This book is a practical, accessible guide to OCL for software architects, designers, and developers. Much care has been taken during the redesign of OCL to ensure that the syntax remains readable and writable by the average software modeler. The Object Constraint Language, Second Edition , utilizes a case study to show how to exercise these compact but powerful expressions for maximum effect.
This newly updated edition
Using a combination of UML and OCL allows developers to realize the effective, consistent, and coherent models that are critical to working with MDA. The authors' pragmatic approach and illustrative use of examples will help application developers come quickly up to speed with this important object-modeling method—and will serve as a ready reference thereafter.
|List of Figures|
|List of Tables|
|Foreword to the First Edition|
|Foreword to the Second Edition|
|Preface and Introduction|
|Pt. 1||User Manual||1|
|Ch. 1||MDA and the Use of OCL||3|
|Ch. 2||OCL By Example||21|
|Ch. 3||Building Models with OCL||37|
|Ch. 4||Implementing OCL||71|
|Ch. 5||Using OCL for MDA||93|
|Pt. 2||Reference Manual||105|
|Ch. 6||The Context of OCL Expressions||107|
|Ch. 7||Basic OCL Elements||121|
|Ch. 8||User-defined Types||129|
|Ch. 9||Collection Types||137|
|Ch. 10||Advanced Constructs||155|
|App. A: Glossary||171|
|App. B||OCL Grammar Rules||175|
|App. C||A Business Modeling Syntax for OCL||181|
|App. D||Example Implementation||191|
|App. E||Differences Between OCL Versions 1.1 and 2.0||197|
In November 1997, the Object Management Group (OMG) set a standard for object-oriented analysis and design facilities. The standard, known as the Unified Modeling Language (UML), includes model diagrams, their seman-tics, and an interchange format between CASE tools. Within UML, the Object Constraint Language (OCL) is the standard for specifying expressions that add vital information to object-oriented models and other object modeling artifacts.
In UML version 1.1, this information was thought to be limited to con-straints, where a constraint is defined as a restriction on one or more values of (part of) an object-oriented model or system. In UML version 2 the under-standing is that there is far more additional information that should be included in a model than constraints alone. Defining queries, referencing values, or stating conditions and business rules in a model, is all done by writing expressions, i.e. these are all expressed in OCL.
OCL has evolved from an expression language in the Syntropy method through a business modeling language used within IBM until it was included in UML in 1997. At that point in time it received its current name. This name is currently well established and therefore it is not expedient to change it to, for instance, Object Expression Language, although this name would currently be more appropriate.
OCL has been used as an expression language for object-oriented model-ing during the last six years. Today, a large number of tools support the lan-guage. Since OCL was first conceived there have been many changes and additions to the language. Lately this has led to a new version of OCL, ver-sion 2.0, to accompany the new version of UML. OCL version 2.0 is formally defined in the Object Constraint Language Specification OCL2002. This book explains all features of this version of OCL.
Recently, the OMG has launched an initiative called the Model Driven Architecture (MDA). The essence of the MDA approach is that models are the basis for software development. To be able to work with this architecture good, solid, consistent, and coherent models are a neccesity. Using the com-bination of UML and OCL you are able to build such models.
In the many books that have been published on the subject of UML, its expression language has not received the attention it deserves. A first aim of this book is to fill this gap and to explain UML's expression language, which supports the task of modeling object-oriented software as much as the UML dia-grams. The second aim of this book is to introduce OCL version 2.0 to a wider audience. Not everyone is pleased with reading a formal standard, the informa-tion should be available in a more easy to read book. The last aim of this book is to explain why the use of OCL is essential to the application of MDA. Without OCL and the languages, transformations, etc. that are all enabled by OCL, application of MDA is bound to fail.
The book is meant to be a textbook and reference manual for practitioners of object technology who find a need for more precise modeling. This certainly includes persons that want to apply MDA principles. These people will want to use OCL in their analysis and design tasks, most probably within the context of UML but potentially with other graphical object modeling languages. This book assumes that you have general knowledge of object-oriented modeling, preferably UML. If you lack this knowledge, there are many books on UML that you can read first.
Part 1 of this book explains how OCL can be put to use. Anyone unfamiliar with OCL should read this part. An introduction to the Model Driven Architecture is given and the key role OCL plays in that framework is described. In this part OCL is explained in a relatively informal way, mostly by example. Hints and tips are given on how to build models using OCL and on how to implement these models. Part 2 constitutes a reference guide that describes the OCL language com-pletely. If you are already familiar with OCL you can find evrything you want to know about the new version of OCL in this part.
Appendix A is a reference on the terminology used in this book. Appendix B is a reference on the syntax of the language. Finally, appendix would be of interest for people who feel that the offical (concrete) syntax of OCL could be improved. It gives an example of a different syntax, called Business Modeling Syntax, that may be substituted for the offical syntax.
This book uses the following typeface conventions:
The text of the UML and OCL standards is freely available from the OMG website (www.omg.org). Recent information on OCL can be found on the Klasse Objecten website: www.klasse.nl/ocl/. Several tools are available that can trans-late OCL to code. Since the tool market is rapidly changing, we do not provide a list of tools in this book; it would be outdated quickly. Instead, on the before men-tioned website you can find an up-to-date list of tools that are currently available.