Home > Articles > Software Development & Management > Object Technology

UML Essentials, Elements, and Artifacts

This sample chapter, from A UML Pattern Language, by Paul Evitts, provides you with a high-level summary of the main elements and artifacts of the UML -- enough to get started with the pattern language. Anyone with a working knowledge of the UML can skim this chapter with the proviso that it provides information based on the 1.3 beta version of the UML Specification (Rational Software Corporation 1999), and so it may be useful as an update.
This chapter is excerpted from A UML Pattern Language, by Paul Evitts.

There aren't enough symbols to cover all the subtly different things we want to say.

—Desmond D'Souza and Alan Wills (1998, 371)

This chapter provides you with a high-level summary of the main elements and artifacts of the UML—enough to get started with the pattern language.

Obviously, a single chapter is scarcely adequate to even begin the exercise of learning about the UML. But there are many good books out there that can provide an introductory service for those not already using the UML, and this book isn't meant to cover their territory. Anyone with a working knowledge of the UML can skim this chapter with the proviso that it provides information based on the 1.3 beta version of the UML Specification (Rational Software Corporation 1999), and so it may be useful as an update.

Also, I take a somewhat different approach than is typical for introductions. One difference is that this chapter, like this book and the UML itself, is process-independent. And, where it's important to illustrate anomalies and differences that come from the different ways that processes can interpret the UML, I use Rational's Unified Process and Desmond D'Souza and Alan Wills' book, Objects, Components and Frameworks with UML: The Catalysis Approach (1998) as examples of almost orthogonal processes. I've tried to distinguish between process-specific uses and notations and those that are "vanilla" UML. Where there are notable anomalies, I draw attention to them.

The other way that this chapter is different is that I focus on the packaging and notational side of the UML rather than the detailed semantics of the UML constructs. I do this for two reasons:

  • The packaging, organizing, and drawing side of the UML seems to be underrepresented in the literature. How to go about making a model has taken a back seat to using the UML in creating development artifacts—a subtle but significant difference.

  • For a book like this, which is aimed at modeling rather than programming, understanding packaging and notation is crucial to using the UML effectively as a tool, just as knowing the syntax is crucial to using a programming language effectively. This chapter aims to clarify what has been a notable amount of confusion in this area, in writings about the UML.

For the most part, the semantics of the UML are sufficiently object-oriented to present little difficulty to anyone with a programming background in any of the object-oriented languages. Of course, some aspects of the UML semantics that are specific to modeling or that are idiomatic to the UML need to be explained, and I'll cover these as well.

Like patterns, a summary such as this one doesn't benefit from inspired originality or novel insights. So, I relied on tried-and-true sources, and I reworked existing material, rather than providing a new way of looking at the innards of the UML. The description that follows is primarily drawn from the UML Specification, Version 1.3 (Rational Software Corporation 1999), fleshed out by readings from UML Distilled: Applying the Standard Object Modeling Language (Fowler, Scott, and Jacobson 1997) and Objects, Components and Frameworks with UML: The Catalysis Approach (D'Souza and Wills 1998).

3.1 Elements, Viewpoints, and Views

The idea of a view is a key one in the UML: It provides the basis for the UML notion of a model. However, it is not a formal construct in the UML (although it is in the Rational Unified Process [RUP], a distinction that is typically muddied by writers about the UML). Instead, it acts as an informal concept that helps situate the role—and responsibilities—of the modeler.

In the UML, a model is a complete representation of a system from a particular viewpoint (that is, an aggregation of a set of views from specific perspectives). At the same time, systems are logically composed of many nearly independent models, representing many different viewpoints; and they can be physically composed of many independent subsystems, each of which can also be treated as a system for modeling purposes.

A system itself is implicitly represented by a top-level model with subsidiary models representing specialized views. Each model is made up of diagrams and text. The UML Specification describes diagrams as "views of a model," each representing a particular perspective that the overall model aggregates and integrates (Rational Software Corporation 1999). All of this applies recursively to subsystems as well.

The perspective that a model represents is a combination of the model's purpose and the level of detail it provides. Any system can contain a myriad of viewpoints and models, which depend on the role of each viewer, the conceptual stance he or she brings to the viewing, and the ultimate purpose of the view. Any viewpoint can be expressed by a myriad of views and diagrams, depending on the interests of the audience being addressed.

The modeler represents these views, wearing different hats in turn, and adopting different viewpoints. A user's view will end up being expressed differently depending on whether the audience is senior management or a technical person. A management perspective might result in a management model that emphasizes architecture and minimizes technical detail.

At the most abstract, a system should be modeled from at least two viewpoints:

  • Looking at the outside world—an interpreted reality

  • Looking at the product—a constructed reality

As modelers, in order to build a system, we model our understanding of the context, requirements, practices, and constraints to ensure that we have the problem and problem setting right. We then model the architecture, specifications, design, implementation, and deployment of what the builders should build. The second viewpoint provides a blueprint that builders can work from and the documentation that management needs to get the product built, keep it working, and make it useful.

The advantage an object-oriented approach brings to modeling is that it allows a modeler to "bridge the chasm" (Jacobson, Booch, and Rumbaugh 1998a, 7) between the analysis and design models by providing a semantically consistent conceptual framework, regardless of the viewpoint involved. Things in the real world are represented as objects, in the same way that things in the constructed world are. The modeling modes are still distinct, but the language is very much the same.

Naturally, in an iterative development process, even the barrier between modeling modes is permeable, and there's a constant to-and-fro, as opposed to rigid distinctions. In fact, as I will discuss in Chapter 11, "Putting It All Together: Reflecting on the Work of Design," proper design practice requires the interweaving of these two modes.

Beyond the simple need for a minimum of two viewpoints, additional viewpoints can be added to the picture, depending on the expressive granularity the modeler feels is warranted. Individual processes will treat the idea of views differently, making them formal constructs (for example, RUP) or leaving them as informal concepts (for example, Objects, Components and Frameworks with UML: The Catalysis Approach [D'Souza and Wills 1998]). The UML also assumes that you may want to create your own kinds of diagrams and your own kinds of models, and you may want to extend the UML in various ways to establish your own local modeling dialect.

3.1.1 Models and Model Elements

To repeat: A UML model is an abstraction, a complete representation of a physical system. Models are about things, relationships, behaviors, and interactions in a system. Equally important, models are about how to organize this information because conceptual chunking is an important tool for successful abstracting.

The UML itself distinguishes two types of models:

  • Structural models—Represent the pieces of a system and their relationships.

  • Dynamic models—Represent the behavior of the elements of the system and their interactions.

Models are made up of model elements. Model elements are named uniquely in the context of a given namespace (usually a package) and have visibility, which defines how they can be used (and reused) by other model elements.

Visibility determines the way individual elements can connect with each other. Therefore, it is a critical part of managing the complexity of models via information hiding. Decisions about visibility can be powerful factors influencing decisions about the logical organization of models. It is one of the ways in which the UML is distinctly different from previous generations of modeling languages and tools—by leveraging and extending the notion of visibility from object-oriented languages themselves.

In the UML, model elements may be visible in one of three ways:

  • Public—Any outside model element can see the model element.

  • Protected—Any descendent can see the model element.

  • Private—Only the model element itself, its constituent parts, and the model elements nested within it can see it.

NOTE

Individual parts of the UML adjust this general notion of visibility to suit specific circumstances. See the discussion of package visibility in Section 3.2, "Packages," later in this chapter.

Models and model elements are rendered graphically in diagrams and textually in specifications, and they are organized in packages.

In UML notation, model things are expressed as symbols or icons, and relationships and interactions are typically expressed by using various kinds of adorned lines. The lines themselves aren't just passive, decorated connectors; in the UML, they're also symbols with semantic content and underlying rules. And, as organizational elements, neither models nor diagrams have a specific notational form (that is, the UML symbol)—only packages do.

Of course, it's not the rendering of the individual elements that provides the meaning and meat to a model, but the way they all connect. The connection between a model, its diagrams, and their parts—the connection between a viewpoint and expressed views—is almost rhetorical. Intention, attention, and focus provide differences in level of detail, formality, content, and manner of presentation.

Models aren't just diagrams; in the UML, the diagrams are only the visual rendering of the model. Underlying the graphics of a model are the specifications of the model elements. These are composed in text, and may be a mix of the formal and the informal. The text is as important as the diagrams and in some cases more so: use cases are an example (see Section 3.6.2, "Use Case Diagram," later in this chapter). The UML Specification itself is an example of a model (although not a good one, if judged by its clarity and communicative effectiveness).

3.1.2 Diagrams

Semantically, diagrams express views of a model (that is, subsets of the viewpoint that each model represents). An individual model element can be presented in one or many of the diagrams for a model; in other words, a model element can be presented in many different ways and in many diagrams—but it must be presented in at least one diagram in one way.

Diagrams don't have any special shape assigned to them; they can be free-floating, bounded by a box, or contained within a package. Some other considerations are as follows:

  • Neither geometry nor "geography" has much significance in a UML diagram. For the most part, a symbol's size or relative location generally has no semantic content, except for diagrams that have a time dimension.

  • Diagrams are all two-dimensional because of the current limits imposed by available technology and tools, although some shapes are nominally three-dimensional, rendered in two dimensions (cubes, for example).

  • Text can be used liberally within a diagram. Examples include expressing rules and, within symbols, identifying attributes.

Finally (for this introduction), the UML Specification (Rational Software Corporation 1999) highlights three kinds of visual relationships in diagrams:

  • Connection—Lines connect icons and symbols, forming connecting paths. Paths are always attached to symbols at both ends (that is, no dangling lines are allowed).

  • Containment—Boxes, circles, and other fully enclosed shapes contain symbols, icons, and lines.

  • Visual attachment—Elements that are close together may have a relationship suggested by their proximity. For example, a name above a line or next to a box may be interpreted as applying to the line or box.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020