UML Explained
When I started seriously considering writing a proposal for a book about the Unified Modeling Language (UML), Amazon listed about 62 books whose titles contained "UML." By my reckoning, 61 of those books were aimed at programmers and other highly technically oriented people. The other one introduced its example system more than halfway through the book and, a few pages into that chapter, started showing figures with way too many things in them for a beginner to be able to handle. It became clear to me that what was missing was a book that approaches the UML from the standpoint of what relatively nontechnical people need to understand in doing their jobs--like how to capture requirements--rather than starting with the diagrams, as most of these other UML books do.I wrote this book literally for "the rest of us," people who see the UML from the outside looking in. UML Distilled (Fowler and Scott, Addison-Wesley, 1997), for instance, made certain assumptions about its readers, namely, that they were comfortable with object-oriented terminology and concepts and that, for the most part, they were already using one or another of the approaches designed by the "three amigos," the creators of the UML--Grady Booch, Jim Rumbaugh, and Ivar Jacobson. For every set of modelers and analysts and developers who sank their teeth into Martin Fowler's brilliantly conceived book, though, there were at least a few people who wanted to know about this cool language but didn't quite know where to start. If you're in that latter group, this book may be for you.I'm not assuming any knowledge of object orientation (OO). (Note that although the UML certainly is applicable in non-OO contexts, such as data modeling, the language was explicitly designed for use with OO.) If you find yourself reading a definition you're already familiar with, you should be able to skip that paragraph (or subsection or section) without any problem. I've also focused on capturing what I think are the most important aspects of the UML for people who probably aren't at the center of development efforts but still need to know what's what.I made my living as a technical writer for 16 years, translating complicated subject matter into reader-friendly documents and manuals. Now I make my living as a trainer and mentor, teaching people about the UML and about the approach to software development that Use Case Driven Modeling with UML (Rosenberg and Scott, Addison-Wesley, 1999) advocates. I'd like to think that this book reflects my years of experience.  Organization of This BookChapter 1, Why the UML?, describes why it's important to learn about the UML. This includes an explanation of the crucial nature of visual modeling. The chapter also offers some history about how the UML evolved and an overview of the key underlying principles of the language.Chapter 2, The UML and Process, explains that even though the UML is technically process independent, it's been explicitly designed to work within the context of an iterative and incremental process. This discussion includes an overview of the Unified Process and a look at how the phrases "use case driven," "architecture-centric," and "iterative and incremental" will appear, in one form or another, throughout the rest of the book.Chapter 3, Identifying Relevant Real-World Things, describes how a project team uses the UML in identifying, and beginning to refine, the things and concepts in the real world of relevance to the problem that the team is trying to solve with the new system. This chapter introduces The Internet Bookstore, a proposed online bookstore that will serve as a running example throughout the rest of the book.Chapter 4, Capturing Requirements, describes how people can use what are known as "use cases," which are scenarios that include user actions and system responses, to explore, negotiate, and refine functional requirements. The chapter also addresses the role that prototyping plays in the development and refinement of use cases.Chapter 5, Expressing How Things Work Together, describes how a project team explores how objects work together to address the behavior specified by use cases, as well as other required system behavior. This includes a discussion of robustness analysis, which uses extensions to the UML that are specific to the Unified Process.Chapter 6, Refining the Structure of Things, describes the tasks involved in refining and expanding the domain model, which contains the real-world things and concepts first discussed in Chapter 3, and how this effort happens in response to the work involved in modeling interactions (discussed in Chapter 5).Chapter 7, Describing Flows, describes how you can use the UML to describe business and process workflows. The chapter also discusses how you capture the behavior of a system that can have multiple activities occurring at once.Chapter 8, Tracking the Lives of Things, describes how the UML represents the lifetimes of objects as they carry out the work of the system. This discussion includes a look at how certain kinds of objects can exist in more than one state at the same time.Chapter 9, Showing How Groups of Things Work Together, describes how a team can use various UML constructs and diagrams to illustrate how groups of things will work together in the system, on a conceptual level. This includes the UML definitions of terms such as "pattern" and "framework" that are increasingly important in the realm of software development.Chapter 10, Describing How Things Will Be Built, describes the ways that one shows how the system being designed will actually be built, in terms of packages of software called "components," and how those components will be geographically distributed in the new system.The book also includes a glossary, which contains definitions for all the terms introduced in the body of the text, and a complete index.  BackgroundThis book has been in the works for a long time.The story starts in the spring of 1996. I was living in Dallas, getting a little bored making my living as a technical writer, cranking out software documentation for programmers I'd never meet. I decided to approach Rational about getting some kind of job that would get me closer to actual customers.That conversation didn't lead to anything in the way of a job, but it did lead to me getting a copy of the 0.8 version of the documentation set for what was then called the Unified Method, written by Grady Booch (who I'd heard of) and James Rumbaugh (who I hadn't). After a quick glance at the densely packaged paragraphs and the scary diagrams (one had 15 boxes and 19 lines), I put it aside.My relentlessly curious nature caused me to pick up the book again soon after that. Then I spent several hours trying to make sense out of it. I finally realized that I was looking at something fairly significant, and that the only way I'd be able to really understand it would be to rewrite it. I was just beginning to follow the comp.object newsgroup on the Internet, so I decided, on a lark, to post a query that read something like this: "What would you think if a professional writer rewrote this material?"Grady Booch wrote back and said "Go for it!"This was more than a little disorienting. On the one hand, I was encouraged to get a positive response; on the other hand, I thought, "Great. The first thing I did is annoy Grady Booch." When I asked him what he meant, though, he told me that he and Jim and Ivar Jacobson (whose name would appear on the cover of the next version of the Unified Method documentation) were all likely to write 600-page books, and there was a good chance they wouldn"t be ready for a long time. Then he said that if I were to write a concise guide to the Unified Method--say, 150 pages--people would buy it.So, I put together a proposal and sent it to Addison-Wesley, on my birthday (never mind which one). I was pretty dubious about it, given that I knew almost nothing about object orientation, but I figured I had nothing to lose.Over the next six months, the proposal didn't get accepted, but it wasn't exactly rejected either. I decided to move to San Francisco at the end of 1996, and soon after that, interesting things started happening.I met the editor to whom I'd submitted the proposal, Carter Shanklin, at Rational's user conference early in 1997. He said that my proposed book wasn't going to be viable, but also that he was ready to do a deal for the first book about what was now called the Unified Modeling Language (UML), and that he'd be interested in having me involved in some way.Around that time, I met Jim and Ivar. (Grady was at Oracle, so unfortunately I didn't get a chance to meet him then and thank him for helping me get to that point. Oddly enough, I was working for Oracle at the time.) There were various ideas bouncing around about how this book was going to get done, but in the end, Booch, Jacobson, and Rumbaugh weren't directly involved in the production of the book. Instead, Carter brought Martin Fowler, whose recently published Analysis Patterns was already getting great reviews, and myself together to see if the chemistry was right for cranking a book out in, oh, four months.I had no idea whether we could come anywhere near meeting that deadline, but I figured I'd give it a shot. Martin already had about half the book written when we got started, which helped considerably. The first thing I did was take a chunk of about 75 pages of text and diagrams and turn it into a reviewable piece of material, making decisions about subsections and mixing up paragraph lengths and many other things--over a period of three days, which included one full day of work for Oracle--and we were off to the races. I guess UML Distilled came out pretty well, all things considered.After the book came out, I wanted to publish something in my own voice, so I put together the first version of my UML Dictionary. This was based on the official documentation that Rational submitted to the Object Management Group (OMG) in the spring of 1997, when it was first seeking approval of the UML as a standard. The text was still fairly stiff, but at least I was getting a good handle on the material.The Dictionary led to another book deal (Use Case Driven Object Modeling, with Doug Rosenberg), and now, here I am with my first solo book.  AcknowledgmentsI'd like to thank the Academy...Let's start again.I'd like to thank the several thousand people who've played crucial roles in my development as an author. In alphabetical order...Maybe not.I'd like to extend special thanks to the following Lucky 13: Guy and Nancy Scott, who had the good sense to put me on the right path and then (mostly) stay out of the way; Jonathan Leach, intellectual foil supreme; Lisa Silipigni, who helps me remember every day to fight the good fight; Grady Booch, without whom I wouldn't have been able to write this book; Martin Fowler, for letting me produce the world's best UML book; Carter Shanklin, Paul Becker, and Ross Venables, past and present representatives of a class organization, Addison-Wesley; Doug Rosenberg, who supplied the inspiration for the running example, taught me how to do robustness analysis, and provides me a healthy living as a UML trainer and mentor; Laura Danoff, for at least trying to read my other books; Robert Pirsig, who posed the questions that keep me going; and Hunter Faires, the greatest teacher ever.