您的位置:首页 > 运维架构 > 网站架构

UML的基础元件之架构元件(一)

2014-06-16 13:08 225 查看

Structural Things
Structural things
are the nouns of UML models. These are the mostly static parts of a model, representing elements that are either conceptual or physical. Collectively the
structural things are called classifiers.

架构元件是UML模型的名称.它们是模型最静态的部分,体现的是概念上的元素或物理上的元素.架构元件统称为分类器.

A
class is a description of a set of objects that share
the same attributes, operations, relationships, and semantics. A class
implements one or more interfaces. Graphically, a class is rendered as a rectangle, usually including its name, attributes, and operations,

类描述对象集,对象集拥有同样的属性,操作,关联和语义.类实现一个或更多的接口.类生动地以一个矩形框呈现,通常包含它的名称,属性和操作.

An
interface is a collection of operations that specify
a service of a class or component. An interface therefore describes the externally visible behavior of that element. An interface might represent the complete behavior of a class or component or only a part of that behavior. An interface defines a set of operation
specifications (that is, their signatures) but never a set of operation implementations. The declaration of an interface looks like a class with the keyword <<interface>> above the name; attributes are not relevant, except sometimes to show constants. An interface
rarely stands alone, however. An interface provided by a class to the outside world is shown as a small circle attached to the class box by a line. An interface required by a class from some other class is shown as a small semicircle attached to the class
box by a line.

接口是操作的集合,用来列举类或者组件提供的服务.因为接口描述元素对外可见的行为.接口也许表现类或组件的完整行为,或者仅表现它们的部分行为.接口只定义一组操作的规格(即它们的特征),而不会定义这组操作怎么实现.接口的声明与类相似,只是在名称上面多了一个<<接口>>标识;除了有时显示常量外,没有相关的属性.而且接口很少单独画出,通常还需要画出接口的输入与输出,类的输出接口由一个小圆圈将类与外部世界相连.类的输入接口由一个小半圆与其它类相连.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: