EARTH WEEK
Go paperless and save 40% on eligible eBooks, 70% on video now through April 26. Shop the sale.
Register your product to gain access to bonus material or receive a coupon.
Now widely adopted as the de facto industry standard and sanctioned by the Object Management Group, the Unified Modeling Language (UML) is a notation all software developers need to know and understand. However, the UML is a big language, and not all of it is equally important. The award-winning first edition of UML Distilled was widely praised for being a concise guide to the core parts of the UML and has proved extremely successful in helping developers get up and running quickly. UML Distilled, Second Edition, maintains the concise format with significantly updated coverage of use cases and activity diagrams, and expanded coverage of collaborations. It also includes a new appendix detailing the changes between UML versions.
Written for those with a basic understanding of object-oriented analysis and design, this book begins with a summary of UML's history, development, and rationale and then moves into a discussion of how the UML can be integrated into the object-oriented development process. The primary author profiles the various modeling techniques in the UML--such as use cases, class diagrams, and interaction diagrams--and describes the notation and semantics clearly and succinctly. He also outlines useful non-UML techniques such as CRC cards and patterns. These descriptions are made even more relevant with a collection of best practices based on the primary author's experience and a brief Java programming example demonstrating the implementation of a UML-based design. With this tour of the key parts of the UML, readers will be left with a firm foundation upon which to build models and develop further knowledge of the Unified Modeling Language.
Praise for the First Edition"UML Distilled is a recipient of the prestigious 1997 Software Development Magazine Productivity Award in the Books category. Addison-Wesley congratulates authors Martin Fowler and Kendall Scott for their outstanding work."
"This book is a godsend. It is packed with solid advice presented in a concise and highly readable way. The essence of the notations is explained very well indeed but the author goes beyond this to give very clear insights into the application of UML techniques."
-- Jennifer Stapleton, Vice President Technical, British Computer Society
"UML Distilled is well written, knowledgeable about both systems development and UML, and disarmingly honest."
-- Robert L. Glass, The Software Practitioner (March 1998)
"UML Distilled proves that you can say a lot of useful things about computing in a small book."
-- Gregory V. Wilson, Dr. Dobb's Journal
Foreword xv.
Preface xvii.
1. Introduction.
What Is the UML?
How We Got Here.
Notations and Meta-Models.
Why Do Analysis and Design?
Looking for More Information.
Overview of the Process.
Inception.
Elaboration.
Planning the Construction Phase.
Construction.
Transition.
When to Use Iterative Development.
Where to Find Out More.
Use Case Diagrams.
Business and System Use Cases.
When to Use Use Cases.
Where to Find Out More.
Perspectives.
Associations.
Attributes.
Operations.
Generalization.
Constraint Rules.
When to Use Class Diagrams.
Where to Find Out More.
Sequence Diagrams.
Collaboration Diagrams.
Comparing Sequence and Collaboration Diagrams.
When to Use Interaction Diagrams.
Stereotypes.
Object Diagram.
Class Scope Operations and Attributes.
Multiple and Dynamic Classification.
Aggregation and Composition.
Derived Associations and Attributes.
Interfaces and Abstract Classes.
Reference Objects and Value Objects.
Collections for Multivalued Association Ends.
Frozen.
Classification and Generalization.
Qualified Associations.
Association Class.
Parameterized Class.
Visibility.
Packages.
Collaborations.
When to Use Package Diagrams and Collaborations.
Where to Find Out More.
Concurrent State Diagrams.
When to Use State Diagrams.
Where to Find Out More.
Decomposing an Activity.
Dynamic Concurrency.
Swimlanes.
When to Use Activity Diagrams.
Where to Find Out More.
Deployment Diagrams.
Component Diagrams.
Combining Component and Deployment Diagrams.
When to Use Physical Diagrams.
Patient Observation: Domain Model.
Patient Observation: Specification Model.
Moving to Code.
Revisions to the UML.
Scheduled Future Revisions.
Changes in UML Distilled.
Changes from UML 1.0 to 1.1.
Changes from UML 1.2 (and 1.1) to 1.3 (and 1.4).
Two years ago, Addison-Wesley approached me to write a book about the then-new UML. At that time, there was a lot of interest in the UML, but only a standards document from which to learn about it. We broke many records to quickly produce a short introductory guide to the new UML, something that would provide some guidance until the more detailed and official books were to appear later that year.
We didnit expect this book to last after more detailed books appeared. Most people believed that given the choice between a slim overview and a detailed text, everyone would pick the detailed text. Although that was the general view, I believed that even in the presence of detailed books, there was still room for a concise summary.
Two years later, my hopes have been realized more than I could have wished. UML Distilled has been, in computer industry terms, a best-seller. Even though good detailed books have appeared on the UML, the book still sells well. Better than that, more slim books have appeared, confirming my belief that in a world with so much information, there is value in well-chosen brevity.
Now, thatis all very well, but should you buy this book?
Iim going to assume youive heard about the UML. It has become the standard way to draw diagrams of object-oriented designs, and it has also spread into non-OO fields. The major pre-UML methods have all died out. The UML has arrived and is here to stay.
If you want to learn about the UML, this book is one way to do it. The main reason for starting with this book is that itis a small book. Buying a big book will give you more information, but it will also take you longer to read. Iive selected the most important parts of the UML so that you donit have to. With this book, youill pick up the key elements of the notation and what they mean. If you want to move further, you can move to a more detailed book later.
If you want a longer tutorial to the UML, I suggest the Unified Modeling Language User Guide (Booch, Rumbaugh, and Jacobson 1999). The User Guide is able to cover a lot more ground. Itis well written and organized in a way that explains how to apply the UML to various modeling problems.
Both this book and the User Guide assume that you know something about OO development. Although many people have told me that this book is a good introduction to objects, I didnit write it with that in mind. If youire looking for an introduction to objects with the UML, you should also consider Craig Larmanis book (Larman 1998).
Although the main point of this book is the UML, Iive also added material that complements the UML material. The UML is a relatively small part of what you need to know to succeed with objects, and I think that itis important to point out some of the other things here.
The most important of these is software process. The UML is designed to be independent of process. You can do anything you like; all the UML does is say what your diagrams mean. However, the diagrams donit make much sense without a process to give them context. I also believe that process is important and that a good process doesnit need to be complicated.
So, Iive described a lightweight outline process for OO software development. This provides a context for the techniques and will help to get you going in using objects.
The other topics include patterns, refactoring, self-testing code, design by contract, and CRC cards. None of these are part of the UML, yet they are valuable techniques that I use regularly.
Chapter 1 looks at what the UML is, the history of its development, and the reasons why you might want to use it.
Chapter 2 discusses the object-oriented development process. Although the UML exists independent of process, I find it hard to discuss modeling techniques without talking about where they fit in with object-oriented development.
Chapters 3 through 6 discuss the three most important techniques in the UML: use cases, class diagrams, and interaction models. The UML is a large beast, but you donit need all of it. These three techniques are the core that almost everyone needs. Start with these and add the others as you need them. (Note that since class diagrams are so complicated in themselves, Iive put the key parts of class diagrams in Chapter 4 and the advanced concepts in Chapter 6. )
Chapters 7 through 10 explore the remaining techniques. All of these are valuable, but not every project needs every technique. So these chapters provide enough information to tell you what the technique is and whether you need it.
For all of these techniques, I describe the notation, explain what the notation means, and provide tips about using the techniques. My philosophy is to make clear what the UML says and, at the same time, to give you my opinions on how best to use it. Iive also added pointers to other books that provide more detail.
Chapter 11 gives a small example to show how the UML fits in with programming using (of course) Java.
The inside covers summarize the UML notation. You may find it useful to refer to these as you are reading the chapters so that you can check on the notation for the various modeling concepts.
If you find this book interesting, you can find other information on my work related to using the UML, patterns, and refactoring at my home page (see page xxi).
As the UML evolved, and I received feedback about the first edition of the book, I continually updated it. We reprinted every two or three months; nearly every printing contained updates, which resulted in considerable strain on the processes of the publishing industry.
With the change from UML 1.2 to 1.3, we decided to do a more thorough overhaul of the book, enough to produce a second edition. Since the book has been so popular, Iive tried not to change the essential spirit of the book. Iive carefully tried to not add much, and to see whether there are things I can take away.
The biggest changes are in Chapter 3, about use cases, and Chapter 9, about activity diagrams, which have each received a severe rewrite. Iive also added a section on collaborations to Chapter 7. Elsewhere, Iive taken the opportunity to make a host of smaller changes, based on feedback and my experiences over the last couple of years.
Martin Fowler
Melrose, Massachusetts
April 1999
http://ourworld.compuserve.com/homepages/Martin_Fowler