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.

 为注释建模,

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.

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

时间: 2024-11-03 21:39:43

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

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

 Modeling New Properties 新特性建模 The basic properties of the UML's building blocks-----attributes and operations for classes, the contents of packages, and so on----are generic enough to address most of the things you'll want to model. However, if yo

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

 Modeling New Semantics 新语义建模 When you create a model using UML, you work within the rules the UML lays down. That's a good thing, because it means that you can communicate your intent without ambiguity to anyone else who knows how to read the UML.

UML基本架构建模--通用机制概述

 Common Mechanisms 通用机制 The UML is made simpler by the presence of four common mechanisms that apply throughout the language: specifications, adornments, common divisions, and extensibility mechanisms. This chapter explains the use of two of these

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

 Modeling Different Views of a System 建模系统的不同视图 When you model a system from different views, you are in effect constructing your system simultaneously from multiple dimensions. By choosing the right set of views, you set up a process that forces y

UML基本架构建模--关联的通用建模技术(三)

 Modeling Structural Relationships 建模结构关系 When you model with dependencies or generalization relationships, you may be modeling classes that represent different levels of importance or different levels of abstraction. Given a dependency between two

UML的通用机制(三)

 Common Divisions In modeling object-oriented systems, the world often gets divided in several ways. First, there is the division of class and object. A class is an abstraction; an object is one concrete manifestation of that abstraction. In the UM

UML基本架构建模--获取类

 Getting Started 开始 Modeling a system involves identifying the things that are important to your particular view. These things form the vocabulary of the system you are modeling. For example, if you are building a house, things like walls, doors, w

UML基本架构建模--类的辅助信息

 Organizing Attributes and Operations 组织属性和操作 When drawing a class, you don't have to show every attribute and every operation at once. In fact, in most cases, you can't (there are too many of them to put in one figure) and you probably should not

大规模分布式系统架构与设计实战之通用包工头模式

包工头模式 包工头 – 工人模式: 包工头工人模式我是从一本书上看到的<大规模分布式系统架构与设计实战>.“包工头-工人”模式会使用到Anycmd的User模块中去.AC是一个隐式的项目.一个项目只有一个包工头,一个包工头可以雇佣很多工人,一个工人在一个项目下只受雇于一个包工头.每一个工人都是自己的包工头. 这是军队管理的组织结构. 包工头可以把项目拆分成很多子项目,包工头可以把新的子项目承包给新的包工头,每一个工人都可以承包项目,每一个工人都有机会成为包工头,承包项目的工人立即成为该项目的包