The Elements of the Unified Modeling Language


As previously mentioned, UML is an object-oriented modeling language. The models that are created provide a visual representation of the structure and behavior of a solution software system. UML diagrams are created by grouping a collection of elements tied together by relationships. These elements are the building blocks of UML. There are four types of UML elements: structural, behavioral, grouping, and annotational, which are described in the following sections.

Note

How these elements form relationships with other elements and lead to the development of meaningful analysis and design artifacts will be discussed in the context of their respective diagrams later in this chapter.


The Structural Elements of UML

Structural elements constitute the static aspects of a model and can be conceptual or physical in nature. The structural elements in UML include the following:

  • An actor , who is an entity (person or another software system) that is external to the system under consideration, but interacts with it by performing an action such as modifying or querying it (see Figure 3.1).

    Figure 3.1. The UML representation of an actor.

    graphics/03fig01.gif

  • A use case , which is a descriptive set of actions that are performed between an actor and the system under consideration. By building a collection of use cases, you can visually describe the overall context and behavior of the solution system. Typically there is a textual description supporting each use case (see Figure 3.2).

    Figure 3.2. The UML representation of a use case.

    graphics/03fig02.gif

  • A class provides a notation for modeling the key concepts of a system. A class, which can be used in the analysis and design phases, is a set of objects that share the same attributes, operations, relationships, and semantics (see Figure 3.3).

    Figure 3.3. The UML representation of a class.

    graphics/03fig03.gif

  • An interface , which is a collection of operations that specify a service (see Figure 3.4).

    Figure 3.4. The UML representation of an interface.

    graphics/03fig04.gif

  • A component , which is the physical part of a system that provides the realization of a set of interfaces (see Figure 3.5).

    Figure 3.5. The UML representation of a component.

    graphics/03fig05.gif

  • A node , which is the physical part of a system that exists at runtime and provides a computational resource, such as a J2EE server (see Figure 3.6).

    Figure 3.6. The UML representation of a node.

    graphics/03fig06.gif

The Behavioral Elements of UML

Behavioral elements, as the name suggests, are used to model the behavior of a system in response to specific events. UML supports two types of behavioral elements as follows :

  • An interaction , which constitutes a set of messages exchanged between a set of objects to accomplish a specific purpose (see Figure 3.7).

    Figure 3.7. The UML representation of an interaction.

    graphics/03fig07.gif

  • The state machine , which is used to represent the states that an object goes through during its lifetime in a system (see Figure 3.8).

    Figure 3.8. The UML representation of a state machine.

    graphics/03fig08.gif

The Grouping Elements of UML

Grouping elements provide a means to organize the UML structural and behavioral elements through the employment of package elements. A package is basically a general purpose container into which related elements can be placed, similar to a folder or directory in an operating system (see Figure 3.9).

Figure 3.9. The UML representation of a package.

graphics/03fig09.gif

Package diagrams are optional to UML and not discussed in this chapter.

The Annotational Elements of UML

Annotational elements constitute the explanatory parts of a UML model. For example, the note element can be used to attach a comment to another element (see Figure 3.10).

Figure 3.10. The UML representation of a note.

graphics/03fig10.gif



BEA WebLogic Platform 7
BEA WebLogic Platform 7
ISBN: 0789727129
EAN: 2147483647
Year: 2003
Pages: 360

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net