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

Asystemis a collection of subsystems organized to accomplish a purpose and described by a set of models, possibly from different viewpoints. Asubsystems 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, as 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, you’d want to create several diagrams, each focused on one view. For example, you might find one class diagram that includes classes, such asPerson,Department, andOffice, 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 that’s used by client applications. You’d likely see some of these same classes mentioned in an interaction diagram, specifying the semantics of a transaction that reassigns aPerson to a new

As this example shows, the same thing in a system (such as the classPerson ) may appear multiple times in the same diagram or even in different diagrams. In each case, it’s 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, you’ll find yourself creating the same kinds of diagrams, because they represent common views into common models. Typically, you’ll view the static parts of a system using one of the following diagrams.

3.Composite structure diagram

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

You’ll often use five additional diagrams to view the dynamic parts of a system.

3.Communication diagram

通常使用另外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 that’s 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, you’ll 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 there’s nothing that prevents you from placing wildly disparate kinds of modeling elements in the same diagram, it’s more common for you to have roughly the same kinds of things in one diagram. In fact, the UML’s defined diagrams are named after the element you’ll most often place in each. For example, if you want to visualize a set of classes and their relationships, you’ll use a class diagram. Similarly, if you want to visualize a set of components, you’ll use a component diagram.

偶尔,我一个人站在黄昏的荒野,

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

相关文章:

你感兴趣的文章:

标签云: