UML基本架构建模--图的术语和概念(一)



A system is a collection of subsystems organized to accomplish a purpose and described by a set of models, possibly from different viewpoints. A subsystems is a grouping of elements, some of which constitute a specification of the behavior offered by the other contained elements. A model is a semantically closed abstraction of a system, meaning that it represents a complete and self-consistent simplification of reality, created in order to better understand the system. In the context of architecture, a view is a projection into the organization and structure of a systems model, focused on one aspect of that system. A diagram is the graphical presentation of a set of elements, most often rendered as a connected graph of vertices (thing) and arcs (relationships).

系统是子系统集有组织地完成一个目标,可能从不同的角度通过一组模型描述。子系统是一群元素,其中一些元素构成行为规范提供给其它控制元素。模型是一个语义封闭的抽象系统,这意味着它表达一个完整的自组织的简单化的真实情况,为了更好的理解系统而被创建。在体系结构的语境中,视图是一个组织结构的系统模型的投影,专注于这个系统的一个方面。是一组元素的图形表述,最常表现为顶点(事物)和弧线(关系)的连接图。

 

To put it another way, a system represents the thing you are developing, viewed from different perspectives by different models, with those views presented in the form of diagrams.

换句话说,系统表现你正在开发的事物,通过不同的模型从不同的角度观察,这些观察的视点以图的形式表现。

 

A diagram is just a graphical projection into the elements that make up a system. For example, you might have several hundred classes in the design of a corporate human resources system. You could never visualize the structure or behavior of that system by staring at one large diagram containing all these classes and all their relationships. Instead, youd want to create several diagrams, each focused on one view. For example, you might find one class diagram that includes classes, such as Person, Department, and Office, assembled to construct a database schema. You might find some of these same classes, along with other classes, in another diagram that presents an API thats used by client applications. Youd likely see some of these same classes mentioned in an interaction diagram, specifying the semantics of a transaction that reassigns a Person to a new Department.

一个图是那些组成系统的元素的图形投影。例如,在一个公司的人力资源系统的设计中,你可能有几百个类。你不可能靠盯着一个巨大的包含有所有类和所有关系的图就能了解那个系统的结构和行为。相反的,你会想创建多个图,每个图关注系统的一个方面。举个例子,你可能发现一个类图所包含的类,如部门办公室,组合构成一个数据库模式。还有可能发现同样的这些类,与别的类一起在另一个图中提出了一个API,用于客户端应用程序。你可能会看到同样的这些类在一个交互图中被提及,描述将一个重新分配到一个新的部门这个事务的语义。

As this example shows, the same thing in a system (such as the class Person ) may appear multiple times in the same diagram or even in different diagrams. In each case, its the same thing. Each diagram provides a view into the elements that make up the system.

照这个例子所显示的,一个系统里的相同事物(如这个类)可能在同一个图里出现多次,甚至在不同的图里也有可能出现多次。在每个案例中,它都是同一个事物。每个图提供的视图成为组成这个系统的元素。

 

In modeling real systems, no matter what the problem domain, youll find yourself creating the same kinds of diagrams, because they represent common views into common models. Typically, youll view the static parts of a system using one of the following diagrams.

1.Class diagram

2.Component diagram

3.Composite structure diagram

4.Object diagram

5.Deployment diagram

6.Artifact diagram

  在建模真实系统时,不管什么问题域,你都会发现你所创建的是同一类型的图,因为它们将通用的观点表现为通用的模型。通常用以下几个图中的任一个来显示一个系统的静态部分。

1.类图

2.组件图

3.复合结构图

4.对象图

5.布署图

6.产品图

 

Youll often use five additional diagrams to view the dynamic parts of a system.

1.Use case diagram

2.Sequence diagram

3.Communication diagram

4.State diagram

5.Activity diagram

通常使用另外5个图来展现一个系统的动态部分:

1.用例图

2.序列图

3.交互图

4.状态图

5.活动图

 

Every diagram you create will most likely be one of these eleven or occasionally of another kind, defined for your project or organization. Every diagram must have a name thats unique in its context so that you can refer to a specific diagram and distinguish one from another. For anything but the most trivial system, youll want to organize your diagrams into packages.

为定义你的项目或是机构所创建的每个图最有可能是这十一个图中的一个,偶而使用别的图。每个图必须有个名称,这个名称在它的环境中是唯一的,以便你能引用一个具体的图,并能互相区分出来。

 

You can project any combination of elements in the UML in the same diagram. For example, you might show both classes and objects in the same diagram (a common thing to do), or you might even show both classes and components in the same diagram (legal, but less common). Although theres nothing that prevents you from placing wildly disparate kinds of modeling elements in the same diagram, its more common for you to have roughly the same kinds of things in one diagram. In fact, the UMLs defined diagrams are named after the element youll most often place in each. For example, if you want to visualize a set of classes and their relationships, youll use a class diagram. Similarly, if you want to visualize a set of components, youll use a component diagram.

你可以在UML中的同一个图中表现元素的任意组合。例如,你可能在同一个图中同时显示类和对象(这很常见),或是你甚至想在同一个图中同时显示类和组件(允许,但很少见)。尽管没有什么事可以阻止你在同一张图中放置宽泛地且不同种类的建模元素,但更常见的是在一张图上放置大体上同种类别的事物。事实上,UML为已定义的图命名是在你将每个元素放置完之后。比如,如果你想可视化一组类和它们的关系,你会使用类图。同样地,如果你想可视化一组组件,你会使用一个组件图。

 

 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值