天天看點

UML基本架構模組化--通用機制概述



Common Mechanisms

通用機制

The UML is made simpler by the presence of four common mechanisms that apply throughout the language: specifications, adornments, common divisions, and extensibility mechanisms. This chapter explains the use of two of these common mechanisms: adornments and extensibility mechanisms.

通過四個通用機制使得UML更簡單,它們将應用遍及這門語言:詳述,修飾,公共部分和擴充機制.這章講解其中兩個通用機制的用法:修飾和擴充機制.

Notes are the most important kind of adornment that stands alone. A note is a graphical symbol for rendering constraints or comments attached to an element or a collection of elements. You use notes to attach information to a model, such as requirements, observations, reviews, and explanations.

備注是最重要的一類修飾,需要單獨說明.一個備注是一個表達限制或是為一個元件或是一個元件集合附加注釋的圖形符号.你使用備注為一個模型附加資訊,如需求,資料,回顧和說明.

The UML’s extensibility mechanisms permit you to extend the language in controlled ways. These mechanisms include stereotypes, tagged values, and constraints. A stereotype extends the vocabulary of the UML, allowing you to create new kinds of building blocks that are derived from existing ones but that are specific to your problem. A tagged value extends the properties of a UML stereotype, allowing you to create new information in that element’s specification. A constraint extends the semantics of a UML building block, allowing you to add new rules or modify existing ones. You use these mechanisms to tailor the UML to the specific needs of your domain and your development culture.

UML的擴充機制允許你在可控的方式内擴充這門語言.這些機制包括模式化,标簽值和限制.一個模式化是擴充UML的詞彙表,允許你從已存在的詞彙中提取,專門針對你的問題建立一個新的建構塊,一個标簽值擴充UML模式化的特性,允許你在那個元素的規則之内建立一個新的資訊.一個限制擴充UML建構塊的語義,允許你增加新的規則或是修改現有的規則.你使用這些機制來剪裁UML以适應你的領域和你的開發習慣的需要.