UML基本架构建模--给通用机制建模时的注意事项

来源:互联网 发布:js控制标签隐藏 编辑:程序博客网 时间:2024/05/16 19:15


When you adorn a model with notes,

lUse notes only for those requirements, observations, reviews, and explanations that you cant express simply or meaningfully using existing features of the UML.

lUse notes as a kind of electronic sticky note, to keep track of your work in progress.

 

当你在用备注修饰模型时,

l只有在你对那些需求观察回顾和说明不能简单地表达或是使用UML现有功能时才使用备注.

l使用备注作为电子便签,来跟踪你的工作进度.

 

When you draw notes,

lDont clutter your models with large blocks of comments. Rather, if you really need a long comment, use notes as a placeholder to link to or embed a document that contains the full comment.

当你在画备注时,

l不要用大段的注释来使得你的模型看起来乱糟糟的.相反,如果你真需要有大段的注释,使用备注作为点位符,链接或嵌入一个包含有完全注释的文件.

 

When you extend a model with stereotypes, tagged values, or constraints,

lStandardize on a small set of stereotypes, tagged values, and constraints to use on your project, and avoid letting individual developers create lots of new extensions.

lChose short, meaningful names for your stereotypes and tagged values.

lWhere precision can be relaxed, use free-form text for specifying constraints. If you need rigor, use the OCL to write constraint expressions.

 

当你用版式标签值或约束扩展模型时,

l规范在你的项目上少量使用版式标签值和约束,并避免个别的开发人员创建更多的新扩展.

l为你的版式和标签值选择短的且有意义的名称.

l在准确度不是很高的地方,为指定地约束使用自由格式文本.如果你要求严格,使用对象约束语言来写约束表达式.

 

When you draw a stereotype, tagged value, or constraints,

lUse graphical stereotypes sparingly. You can totally change the basic notation of the UML with stereotypes, but in so doing youll make it impossible for anyone else to understand your models.

lConsider using simple color or shading for graphical stereotypes, as well as more complicated icons. Simple notations are generally the best, and even the most subtle visual cues can go a long way in communicating meaning.

 

在你画版式标签值或约束时,

l小心地使用图形化的版式.使用版式你可以完全改变UML的基本标记,但这样做的结果是别人将很难理解你的模式.

l为图形化的版式考虑使用简单颜色或是阴影,以及更复杂的图标.简单标记一般是最好的,甚至是更巧妙的视觉提示,在表达意图里可以走很长的路.

 
0 0