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.
为注释建模,
l把你的注释做为一段文本放在一个备注里,并放置在它提到的元素附近.通过元素使用依赖关系与备注相连,你可以显示更明确地关系.
l记住你可以根据自己的需要隐藏或显示你模型中的这个元素.也就意味着你不必让你的注释随处可见,尽管它所依附的元素是可见的.相反,仅在你需要在那个上下文中表达信息时才在你的图中显露你的注释.
l如果你的注释很长或涉及的东西比纯文本更丰富,考虑把你的注释放置在一个外部文档中,在备注里链接或是嵌入那个文档再依附到你的模型中.
l在你的模型改进的时候,保留那些记录有不能通过模型推断出来的重大决定的注释,除非他们对历史过程感兴趣,否则将其它的注释丢弃.
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.
在这个例子中,大多数的注释是简单文本(如玛丽的注解),但其中一个(在图底的那个注解)则提供引向另一个文档的链接.