UML基本架构建模--给关联建模时的注意事项
来源:互联网 发布:人工智能软件有哪些 编辑:程序博客网 时间:2024/05/18 12:29
When you model relationships in the UML,
lUse dependencies only when the relationship you are modeling is not structural.
lUse generalization only when you have an“is-a-kind-of” relationship; multiple inheritance can often be replaced with aggregation.
lBeware of introducing cyclical generalization relationships.
lKeep your generalization relationships generally balanced; inheritance lattices should not be too deep ( more than five levels or so should be questioned ) nor too wide ( instead, look for the possibility of intermediate abstract classes ).
lUse associations primarily where there are structural relationships among objects. Do not use them to show transient relationships such as parameters or local variables of procedures.
当你在UML中构建关系模型时,
l当你所建的关系模型不是结构型的才能使用依赖.
l当你有一个”是一个种类”的关系时使用泛化;多重继承通常被聚合替换.
l当心引进循环泛化关系.
l让你的泛化关系总体上保持平衡;继承框架不能太深(超过五层左右应该仔细斟酌)也不能太宽(相反,找中间抽象类的可能性).
l使用联合主要是在对象之间存在结构关系.不要用它们来表现临时的关系,如参数或是过程的局域变量.
When you draw a relationships in the UML,
lUse either rectilinear or oblique lines consistently. Rectilinear lines give a visual cue that emphasizes the connections among related things all pointing to one common thing. Oblique lines are often more space-efficient in complex diagrams. Using both kinds of lines in one diagram is useful for drawing attention to different groups of relationships.
lAvoid lines that cross unless absolutely necessary.
lShow only those relationships that are necessary to understand a particular grouping of things. Superfluous relationships ( especially redundant associations ) should be avoided.
当你在UML中画关系时,
l直线或是斜线在使用上的一致性.直线线条给视觉提示,强调相关事物之间的联系都指向同一个事物.斜线通常在复杂图表中更节省空间.在一个图表中使用这两种线条,绘画过程中注意不同群组的关系是有用的,
l除非迫不得以,否则避免交叉线.
l只显示那些有助于理解一个事物的特定群组的关系.应避免多余的关系(尤其是累赘的联合).
- UML基本架构建模--给关联建模时的注意事项
- UML基本架构建模--给类建模时的注意事项
- UML基本架构建模--给通用机制建模时的注意事项
- UML基本架构建模--关联的通用建模技术(一)
- UML基本架构建模--关联的通用建模技术(二)
- UML基本架构建模--关联的通用建模技术(三)
- UML基本架构建模--关联概述
- UML基本架构建模--获取关联
- UML基本架构建模--关联的术语和概念(一)
- UML基本架构建模--关联的术语和概念(二)
- UML基本架构建模--关联的术语和概念(三)
- UML基本架构建模--类的辅助信息
- UML基本架构建模--类的通用建模技术(一)
- UML基本架构建模--类的通用建模技术(二)
- UML基本架构建模--类的通用建模技术(三)
- UML基本架构建模--类的通用建模技术(四)
- UML基本架构建模--通用机制的通用建模技术(一)
- UML基本架构建模--通用机制的通用建模技术(二)
- php中的设计模式之--代理模式
- Cocos2d-x游戏开发——CCSequence&CCSpawn
- UML基本架构建模--关联的通用建模技术(三)
- java基础和规范<一>
- Canvas.drawText绘制文字为什么会偏上?
- UML基本架构建模--给关联建模时的注意事项
- 通过rsync客户端来同步数据
- 杭电OJ——第1000,1001题
- java jsp调用shell(带参数)脚本并返回值
- 开放授权协议OAuth2.0简介
- rsync的FAQ
- erlang 资源
- C++回顾(一)——基本知识
- An error was encountered while running(Domain=LaunchSerivcesError, Code=0)