Introduction to the UML
- What Is the Unified Modeling Language (UML)?
- What Is a Model?
- What Is a Diagram?
- Terms
- Summary
- Review Questions
Topics Covered in This Chapter
- What Is the Unified Modeling Language (UML)?
- Where Did the UML Come From?
- Is the UML Proprietary?
- Is the UML Only for Object-Oriented Development?
- Is the UML a Methodology?
- What Is Happening Now with the UML?
- What Is a Model?
- Why Should I Build Models?
- Why Should I Model with the UML?
- What Can I Model with the UML?
- Who Should Build Models?
- What Is a Diagram?
- What Diagrams Are in the UML?
- What Is the Difference Between Diagrams and Models?
- Terms
- Summary
- Review Questions
What Is the Unified Modeling Language (UML)?
The Unified Modeling Language (UML) is the standard visual modeling language used for modeling businesses, software applications, and system architectures. Although the UML is a standard of the Object Management Group (OMGhttp://www.omg.org/), the UML is not just for modeling object-oriented (OO) software applications. The UML is a graphical language that was designed to be very flexible and customizable. This enables you to create many different types of models, including models for understanding business processes, workflow, sequences of queries, applications, databases, architectures, and more.
Where Did the UML Come From?
To understand the UML, it helps to know its origins. During the late 1980s and into the 1990s, many object-oriented modeling techniques were being developed to model software. Because different people developed these approaches using different visual modeling techniques and notations, the world of application modeling was becoming divided. To further complicate matters, some techniques were designed just for application modeling, and others were targeted at specific areas such as database design. Some leveraged the strengths of the others, but some remained distinct.
Three of these methodologies began to lead the pack in the marketplace. While working for General Electric, Jim Rumbaugh created the Object Modeling Technique (OMT). Ivar Jacobson developed his Object-Oriented Software Engineering method (a.k.a. the Objectory Method), primarily supporting the telecommunicationsindustry in Sweden. Grady Booch developed the self-named Booch Method. Each had their strengths and weaknesses, and each had somewhat different followings.
In the mid 1990s, Rational Software hired Jim Rumbaugh to join Grady Booch and combine their modeling methods into what became version 0.8, the first public draft of what was then called the Unified Method. In 1995, Jacobson joined Rumbaugh and Booch at Rational. Together, they developed version 0.9 of the Unified Method in 1996. Other companies joined Booch, Rumbaugh, and Jacobson as part of the UML Consortium. In 1997, they submitted version 1.0 of the Unified Methodrenamed as the Unified Modeling Language, or UMLto the OMG. As an independent standards body, the OMG took over the UML development and released subsequent versions of the UML (see Figure 1-1). This year (2004), the final approval of the latest version, UML 2.0, is expected.
What makes the UML different from the independent notations we mentioned earlier is that the UML is the creation not of just Booch, Rumbaugh, and Jacobson, but also of many industry experts, software development tool companies, corporate software development organizations, and others. So began the worldwide standard modeling language of software development.
Figure 1-1 History of the UML.
Is the UML Proprietary?
As you decide whether to use the UML to model, one of the main things you need to consider is whether other people who join your organization will be able to understand what you have done and whether it will be communicated unambiguously. Both are good reasons for wanting to select a modeling language that is in the public domain and that is understood around the world.
As we discussed earlier in this chapter, the UML was designed because the different modeling languages that were available at the time were leading to a divergence in the ways to model. However, bringing the three major methods together wasn't quite enough. That is why Rational sought out the involvement of organizations such as IBM, Oracle, Platinum Technologies, and many others to be UML partners in the creation of the UML. They then handed development to the OMG to ensure that the UML would become a standard. As a result, the UML is not proprietary. It is an open modeling standard designed and supported by software companies, consultants, other corporations, and governments who need and rely on this standard.
Although a standard open language is critical to protect you from being locked in by the whims of a technology vendor, having a modeling language that is flexible also is key. As technologies and businesses change, so does the way you model. The UML has conventions built into it that enable you to customize it as needed. These customized versions are created using "stereotypes." You will learn more about them in Chapter 5, "Application Modeling."
Is the UML Only for Object-Oriented Development?
We travel the world talking about modeling and the UML. When we begin to discuss using the UML for business or data modeling (both of which we cover in later chapters), one of the first questions we hear is, "How would I use the UML for that? Isn't it only for object-oriented development?" This is one of the biggest myths we run across. The myth comes from the reality that the UML was devised to satisfy the need to model object-oriented systems and to enable Component-Based Development (CBD). In an OO system, generally several components are tied together using what are called "interfaces." To understand how those different components interact, it is quite useful to build a model.
Although the UML was originally built for this cause, it also was built with other needs in mind. Grady Booch once told us that when he and his colleagues were designing the UML, they based a lot of what they did on the different database modeling techniques already being used in the industry. Similarly, one of the strengths of Jacobson's Objectory Method was its business modeling capability. So when they added elements of Jacobson's Objectory Method to the UML mix, they added business modeling to UML.
Today, you can model almost anything you want to in the UML by using its built-in extension and customization capabilities. The UML features an underlying meta-model (see the "Deep Dive" sidebar on meta-models later in this chapter) that enables the UML to be flexible enough so that you can do what you need to do with it. We have seen the UML used for modeling businesses, data, organizations, theoretical political systems, legal contracts, biological systems, languages, hardware, non-object-oriented application modeling such as COBOL, and many other modeling tasks.
Is the UML a Methodology?
Methodology:
-
"Methodology n.
-
1a. A body of practices, procedures, and rules used by those who work in a discipline or engage in an inquiry; a set of working methods: the methodology of genetic studies; a poll marred by faulty methodology.
-
b. The study or theoretical analysis of such working methods.
-
2. The branch of logic that deals with the general principles of the formation of knowledge.
-
3. Usage Problem...
-
Methodology can properly refer to the theoretical analysis of the methods appropriate to a field of study or to the body of methods and principles particular to a branch of knowledge. ... In recent years, however, methodology has been increasingly used as a pretentious substitute for method in scientific and technical contexts, as in The oil company has not yet decided on a methodology for restoring the beaches. ... But the misuse of methodology obscures an important conceptual distinction between the tools of scientific investigation (properly methods) and the principles that determine how such tools are deployed and interpreted." [AMER1]
This very typical definition of the term methodology explains that a methodology is much more than a language. You can see from the "usage problem" discussed in this definition how this can confuse some people who are new to the UML. The UML is a language. Object-oriented analysis and design (OOAD) is a process, governed by specific practices. Although languages, including the UML, have rules for syntax and usage, they do not have procedures (i.e., processes) or practices. A methodology must include these things as well. So, although a common language is needed in a specific discipline, language alone does not make a methodology. This is true for the UML as well. Thus, you can use the UML with various methodologies, but it is not a methodology itself.
What Is Happening Now with the UML?
As of this writing, the UML is in the final stages of approval for its latest revision, version 2.0. The OMG has been developing this version of the UML for many years. It combines the efforts of more than 100 organizations, bringing together the best practices they developed over the first few versions of the UML as well as needs they identified for the future.
Along with enhancing the UML infrastructure, adding new modeling capabilities, and enabling the easier exchange of models (i.e., between tools or systems), one of the OMG's main goals when developing UML 2.0 was to make it more extensible to accommodate present as well as future needs. For example, one long-standing need that is being addressed is the use of the UML to model embedded systems. (Unlike general-purpose systems such as desktop computers, embedded systems are special-purpose systems such as pacemakers, automotive braking systems, digital cameras, cruise missiles, mobile phones, and so forth that contain hardware and software designed to perform specific functions.) Typically, you would model embedded systems using different languages. But in the on-demand world of today, where you need to link your embedded systems with business systems in your organization, you need to understand how everything works together. This is greatly simplified if you model everything in the same language because it enables you to share information across different types of technologies and different modeling efforts. Prior to version 2.0, the UML provided some of this capability, but the additions the OMG made to the language in version 2.0 have greatly increased this capability.