[译]OOSE第6章:Architecture 体系结构 6.3 模型体系结构

6.3 Model architecture

6.3 模型体系结构

We have seen that system development is basically concerned with developing models of the system. The work is concerned with both identifying and describing objects in a certain information space, and with building models using these objects. Before we look closer at these models, we discuss the object concept common to all models.

 在前面的讨论中, 我们已经看到系统研发的基础是聚焦在开发系统需要的各类模型. 研发工作的重点是在于专注和应用系统相关的一个特定信息空间中对象识别和描述,并且能够利用这些对象来搭建模型.在我们深入的观察这些模型以前, 我们首先来讨论用于构成模型的这些对象的公共特性.

The object concept was introduced in Chapter 3. All the models built during development in OOSE are built using objects. With the help of objects, we will build object models. The objects that we work with in the models all have the properties discussed in Chapter 3.

前面在第三章中已经介绍了对象的概念. 在依托OOSE方法构建的所有模型都是利用对象为基础进行设计的. 利用这些对象的帮助, 我们将构建对象模型. OOSE方法中需要应用的对象全部都拥有在第三章中讨论的对象的属性properties.

For each model we develop, there exist different types of object. By modeling with objects in all models, we gain all the benefits of object-orientation, namely locality of changes, encapsulation, reuse and so on.

 在我们开发的每一个模型中, 存在着不同类型的对象.通过面向所有模型中的对象进行建模设计, 我们同步获得了面向对象设计的主要优点, 包括本地化属性修改, 封装, 重用等特性.

What, then, is a good object? Much of the work within object-oriented analysis and design consists of trying to find a good object. There are several such criteria in various object-oriented methods. Usually, we say that the object should have an interpretation in reality. We also say that the objects should be obvious, tangible things, things that we can focus on. Others say that the objects are just there for the picking.

  那么,什么是一个好的对象呢? 在面向对象的分析和设计中有一大部分的工作是包括努力的寻找一个好的对象. 在多个不同的面向对象的方法中有若干个这样的判断准则. 通常,我们认为对象应当映射到现实世界中进行描述和解释. 同时,我们也认识为对象应当具有明显的, 有形的事物, 这些显性的事物我们能够专著分析. 也有人说对象存在于客观世界,等待我们的选取.

The methods available today to find objects are based closely on learning and analyzing the terminology in the problem area: see Shlaer and Mellor (1988), Wirfs-Brock et al. (1990), Coad and Yourdon (1991a,b), Booch (1991) or Rumbaugh et al. (1991). (Object-oriented methods are discussed m Chapter 16.) By analyzing the terminology, we can extract what seem to be candidates for objects in the system. When we evaluate how the system needs to handle these objects, we can decide whether an object should be included or left out of the model being created.

今天我们广泛使用的寻找对象的方法基础是学习和分析问题领域中的术语terminology. 参考 Shlaer and Mellor (1988), Wirfs-Brock et al. (1990), Coad and Yourdon (1991a,b), Booch (1991) or Rumbaugh et al. (1991). (Object-oriented methods are discussed m Chapter 16.). 通过分析这些术语, 我们可以提取那些术语可以作为系统的候选对象列表.. 当我们进一步的评估软件系统应当如何处理这些对象, 我们可以决定一个特定的对象在我们创造的模型中是否应当包含,或者是遗漏.

 

However, a good object does not exist on its own. We believe that the criteria should reflect good object models instead. An object can be perfectly right for one model, but totally wrong in another. This means that an object must be placed in a context to see whether it is an appropriate object. Therefore, what is really of interest is how an object works with other objects and under what conditions.

然而, 一个好的对象并非是独立存在的. 我们相信评判的准则应该用能够反映好的对象模型来代替.一个对象可以在一个模型中非常完美的正确,同时在另外一个模型中完全不合适.这就意味着一个对象必须能够放置在一个上下文中来观察,他是否是一个合适的对象. 所以真正有价值的判决标准是在于在不同的场景下一个对象如何完美的和其他的对象进行协助.

What, then, is a good object model? The most important criterion is that it should be robust against modification and help the understanding of the system. As we know for certain that all systems we build will be modified, we must create a robust model structure. Therefore we must analyze how modifications will affect the system. Our structure should be affected by this analysis. After we have worked with a model for a while, a stable structure will evolve for the system.

那么,大家回问什么是一个好的对象模型呢其中最重要的准则是在于他应当足够的健壮robust来适应未来潜在的各种变化需求,并能够帮助理解目标系统.因为我们确切的知道我们建设的每一个系统都会在生命周期中持续的进行修改, 我们必须创造强健的模型结构. 所以,我们必须分析未来的系统变更对系统将产生那些影响. 而我们设计的目标结构必须参考这些分析的影响. 当我们对这个模型进行持续的健壮性分析之后, 一个稳定的结构将演化出来使用系统设计的需求..

By working a long time with the early models, we will obtain a good understanding of the system. The development process must therefore be designed so that it results in a sound and robust structure as quickly as possible. This reduces the risk of having to change the system structure at a later stage and it should also force us to use a sound and understandable structure. We will see that the first model designed in OOSE is determined totally by the orderer's functional requirements, often resulting in modifications being local (owing to simple traceability), as they often depend on how an orderer's perspective gets modified. We obtain, in such a way, an orderer-governed structure.

通过面向早期模型长时间的工作, 我们将获得面向系统的良好理解. 后续的开发过程也必须因此同样的进行设计, 并能够在足够短的时间内产生一个合理的,强健的系统结构.这种设计方法极大的减少了在后期大规模改变系统结构的风险,同时他强迫我们使用一个合理的,可以理解的结构.我们将发现在OOSE方法中设计的第一个模型是完全由系统的订购者的功能需求决定, 通常的结果是需求的变更是被限制在局部的范围(由于简单的可跟踪性特性的支持), 因为需求模型是取决于订购者的远景期望而进行修改.通过这种方式, 我们获得可一个订购者-控制的体系结构.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值