UML Basic Architecture modeling-terminology and concepts for general-purpose mechanisms (iii.

Source: Internet
Author: User

Stereotypes

Pattern

the UML provides a language for Structural things, behavioral things, grouping things, and notational things. These four basic kinds of things address the overwhelming majority of the systems you " ll need to model. However, sometimes you ll want to introduce new things that speak the vocabulary of your domain and look like primitive buildi ng blocks.

UML as a structural thing ﹑ Behavioral Things ﹑ group things and annotate things provides a language. These four basic thing types deal with most of the modeling systems you need. However, there are times when you want to introduce something new to the vocabulary of your own domain and make it look like an initial building block.

a stereotype is not the same as a parent class in a parent/child generalization relationship. Rather, can think of a stereotype as a metatype (a type that defines other types), because each one creates the Equiva Lent of a new class in the UML's Metamodel. For example, if you is modeling a business process, you'll want to introduce things like workers, documents, and policies. Similarly, if you is following a development process, such as the Rational Unified process, you'll want to model using boundary, control, and entity classes. This is where the real value of stereotypes comes in. When your stereotype an element such as a node or a class, you is in effect extending the UML by creating a new building B Lock just like a existing one but with it own special modeling properties (each stereotype may provide its own set of TA Gged values), semantics (each stereotype may provide their own constraints), and notation (each stereotype could provide its O WN icon).

In a parent class/subclass generalization relationship, the pattern is not the same as the parent class. Instead, you can think of patterning as a meta-type (defining other types of types), because each creation is equivalent to a new class in the UML meta-model. For example, if you are modeling a business process, you want to introduce things like work ﹑ documents and policies; If you are tracking a development process, such as a reasonable unified process, you want to use the boundary class ﹑ Control class and entity class modeling. This is the true value of stereotypes. When you model a component such as a node or a class, you are actually extending the UML by creating a new building block like an existing component, and unlike a component, the new building block has its own specific modeling properties (each pattern may provide its own set of tag values), Semantics ( Each pattern may provide its own constraints) and tags (each stereotype may provide its own icon).

in Its simplest form, a stereotype is Rendered as a name enclosed by guillemets (for example, ?name?

in its simplest form, a pattern is represented by a name (for example,"name") enclosed by angle brackets, placed on top of another component name. As a graphical identifier (6-5 a), you may define an icon for the pattern, placed on the right side of the symbol name (if you have used a basic tag for the component, 6-5 B) or use that icon as the basic symbol for the modeled item (6-5 c).

Note When You Define an icon for a stereotype, consider using color as a accent to provide a subtle visual cue (but use color sparingly ). The UML lets any shape for such icons, and if your implementation permits it, these icons might appear as Primitiv e tools So, users who create UML diagrams'll has a palette of things that look basic to them and speak the Vocabula Ry of their domain.

remark: When you define an icon for a pattern, consider using a color for the less obvious graphical identity to highlight (but try to use as little color as possible). UML allows you to use any shape for this type of icon, and if your implementation allows it, these icons can appear in the original tool so that the user who creates the UML diagram has a panel of basic things and a glossary that uses their domain.

Tagged Values

Tag Value

Every thing in the UML had its own set of properties:classes having names, attributes, and operations; Associations has names and a or more ends, each with its own properties; And so on. With stereotypes, you can add new things to the UML; With tagged values, you can add new properties to a stereotype.

In UML, every thing has its own set of properties: A class has a name, attributes, and operations, an association with a name and two or more terminals, and each terminal has its own properties, and so on. With stereotypes, you can add new things to UML, and with tag values you can add new attributes to a stereotype.

You define tags this apply to individual stereotypes so the everything with that stereotype have that tagged value. A tagged value is not the same as a class attribute. Rather, you can think of a tagged value as meta-data because it value applies to the element specification Stances. For example, as Figure 6-6 shows, you can specify the required capacity of a server class or require that's only one kind of The server is used in a given system.

The tags you define are applied to the stereotype of the individual, so that each object with a stereotype has a tag value. A tag value is not the same as a property of a class. Instead, you can think of the tag value as Narimoto data, because its value is applied to the description of the component, not its instance. 6-6 is displayed. You can describe the capacity requirements of a service class or simply a requirement in a service that is used in a given system.

Tagged values is placed in a note attached to the affected element, as shown in Figure 6-7. Each tagged value comprises a string that includes a name (the tag), a separator (the symbol =), and a value (of the tag).

The label value is placed in the note, and the note is attached to the component it affects. As shown in 6-7. Each tag value consists of a string that contains a name (label), a delimiter (symbol =), and a value (the label).

Note One of The most common uses of tagged values was to specify properties, is relevant to code generation or configuration Manag Ement. For example, you can use tagged values to specify the programming language to which you map a particular class. Similarly, you can use tagged values to specify the author and version of a component.

Note: a The most common use of tag values is to specify properties about code generation or configuration management. For example, you can use a tag value to specify a programming language to draw a particular class. You can also specify the author and version number of the component using the tag value.

UML Basic Architecture modeling-terminology and concepts for general-purpose mechanisms (iii.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.