码迷,mamicode.com
首页 > 其他好文 > 详细

UML基本架构建模--关联概述

时间:2015-01-13 07:54:25      阅读:149      评论:0      收藏:0      [点我收藏+]

标签:

 

Relationships

关联

 

When you build abstractions, youll discover that very few of your classes stand alone. Instead, most of them collaborate with others in a number of ways. Therefore, when you model a system, not only must you identify the things that form the vocabulary of your system, you must also model how these things stand in relation to one another.

在你构建抽象事物的时候,将会发现你的类很少独立存在.取而代之的是它们中的大多数有很多方式与其它的类交互.因此,当你为某个系统建模时,不仅要从你的系统词汇表中识别事物,还要为这些事物之间的关联建模.

 

In object-oriented modeling, there are three kinds of relationships that are especially important:  dependencies,which represent using relationships among classes (including refinement, trace, and bind relationships ); generalizations, which link generalized classes to their specializations; and associations, which represent structural relationships among objects. Each of these relationships provides a different way of combining your abstractions.

在面向对象建模里,有三类关联特别重要:依赖,它代表的是类之间的使用关系(包括完善,跟踪和绑定关系)通用,将广义类专门化;聚合,代表对象之间的结构关系.这些关联为抽象事物提供了不同的连接方式.

 

Building webs of relationships is not unlike creating a balanced distribution of responsibilities among your classes. Over-engineer, and youll end up with a tangled mess of relationships that make your model  incomprehensible, under-engineer, and youll have missed a lot of the richness of your system embodied  in the way things collaborate.

给关联网建模不同于在类之间创建平衡的职责分配.多余的设计使得关系犹如一团乱麻般,使你的模型难于理解;设计不足你又会错过很多富于表现系统交互的方式.

UML基本架构建模--关联概述

标签:

原文地址:http://blog.csdn.net/listen_snow/article/details/42671433

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!