UML基本架构建模--通用机制的通用建模技术(一)

Modeling Comments

注释建模

The most common purpose for which you’ll use notes is to write down free-form observations, reviews, or explanations. By putting these comments directly in your models, your models can become a common repository for all the disparate artifacts you’ll create during development. You can even use notes to visualize requirements and show how they tie explicitly to the parts of your model.

To model a comment,

lPut your comment as text in a note and place it adjacent to the element to which it refers. You can show a more explicit relationship by connecting a note to its elements using a dependency relationship.

lRemember that you can hide or make visible the elements of your model as you see fit. This means that you don’t have to make your comments visible everywhere the elements to which it is attached are visible. Rather, expose your comments in your diagrams only insofar as you need to communicate that information in that context.

lIf your comment is lengthy or involves something richer than plain text, consider putting your comment in an external document and linking or embedding that document in a note attached to your model.

lAs your model evolves, keep those comments that record significant decisions that cannot be inferred from the model itself, and—-unless they are of historic interest—-discard the others.

For example, Figure 6-9 shows a model that’s a work in progress of a class hierarchy, showing some requirements that shape the model, as well as some notes from a design review.

如6-9图显示的有关类层次增进的工作模型,这个模型的形成是为表现一些需求,以及一些来自设计审核的备注.

In this example, most of the comments are simple text (such as the note to Mary), but one of them (the note at the bottom of the diagram) provides a hyperlink to another document.

在这个例子中,大多数的注释是简单文本(如玛丽的注解),,但其中一个(在图底的那个注解)则提供引向另一个文档的链接.

有勇气并不表示恐惧不存在,而是敢面对恐惧克服恐惧

UML基本架构建模--通用机制的通用建模技术(一)

相关文章:

你感兴趣的文章:

标签云: