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

 

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.

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值