UML基本架構建模--關聯概述

來源:互聯網
上載者:User

標籤:

 

Relationships

關聯

 

When you build abstractions, you’ll 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 you’ll end up with a tangled mess of relationships that make your model  incomprehensible, under-engineer, and you’ll have missed a lot of the richness of your system embodied  in the way things collaborate.

給關連網建模不同於在類之間建立平衡的職責分配.多餘的設計使得關係猶如一團亂麻般,使你的模型難於理解;設計不足你又會錯過很多富於表現系統互動的方式.

UML基本架構建模--關聯概述

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.