面向对象技术

来源:互联网 发布:俄罗斯域名收费 编辑:程序博客网 时间:2024/05/16 15:48

发现在翻译的过程中自己能够学到更多东西,陆续贴一贴自己翻译的文章,供大家伙批评指正。

 

面向对象技术已经成为大多数软件开发的行业标准了。这项技术是从系统分析与系统工程的众多原则演化而来。人们需要一些抽象工具来对复杂软件系统进行分解和建模。这一需求推动了面向对象技术的演化。在对复杂软件系统建模的过程中存在着两股关键而又相反的力量:“抽象化”和“复杂度的最小化”。“抽象化”主要是采用一些理论上的建模原理来对复杂系统建模。“复杂度最小化”非常关键,因为它对开发工作的可行性和时间有着重大的影响。为了一个系统能在尽可能短的开发周期内完成,系统的模型务必仅限于描述系统本质的而且尽可能少的特性。


对系统建模的最佳方案要求抽象的收敛点是确定的。所谓抽象的收敛点是指所采用的理论的级别必须足以解决问题域中所固有的问题,并且又没有采用过多的原理使得问题被过度抽象化,进而引入不必要的复杂度。复杂度是程序员的天敌。程序员应该在开发的各个方面降低复杂度。当然面向对象的主要目的之一也是降低复杂度。所以说最佳的方案就是采用合适的抽象工具来达到抽象的收敛点,定义出问题域所固有的复杂度。


如果说所采用的抽象层次相对于问题域所固有的复杂度过高的话,其所导致的严重后果是整个开发团队的熟练程度也必须要达到相应的更高水平,这样才能保证开发过程中的效率。这就增加了开发过程中的成本和时间。如果说采用了过低的抽象层次,则该方案就不能有效和高效地描述问题域中所存在的各个问题。准确评估问题域中所固有的复杂度的唯一方法就是找到一个问题模型来定义问题域中各个问题的相对重要性和优先级别。这也是在制定复杂软件系统架构过程中的关键任务。


抽象工具是由一个元模型来定义。该元模型是由模式模型、模式、对象模型、对象和对象细节所组成。所有这些都位于不同的抽象级别,依次从高到低排列,定义如下:


对象:对象是软件域中用来实现系统所定义好的状态和行为的具体形式


对象细节:对象细节给出了用以支撑对象模型中所定义的对象间的结构关系的实现细节。对象细节实现了对象行为的各个细节。它通常等同于用编程语言所实现的算法和逻辑


对象模型:对象模型定义了一组对象之间的结构上的关系已经动态的交互工程


模式:模式了定义了在给定场景下经常出现的问题的常被采用的方案。每次应用模式的细节可以不同,但是整个结构,动态交互过程和解决的途径都是一样的。模式是每个对象模型的模板,而对象模型则是模式的一个实例。


模式模型:模式模型表述了模式之间的关系,比如说模式之间的相对重要性以及应用模式时的优先次序。模式模型中的每个模式都位于不同的抽象层次,从而形成层次结构。模式模型直接对应于问题模型,定义出问题域中问题的层次结构。模式模型代表了元模型中的收敛点,定义了在面向对象建模过程中所用到的抽象模型。


-------------------------------------------------------------


Object technology has become an industry standard for the majority of software development. This technology has evolved out of the principles of systems analysis and systems engineering driven by necessity to provide tools of abstraction to decompose and model complex software systems. There are two key and opposing forces involved in the modeling of complex software systems. These are abstraction and the minimization of complexity. Abstraction involves the application of theoretical modeling principles as tools to model a complex system. The minimization of complexity is crucial because this has a large impact on the feasibility of the development effort and the development time. In order for a system to be implemented in the shortest development cycle, the system's model must be reduced to its essential, minimal characteristics.


The optimal solution for modeling a system requires that the point of convergence for abstraction be determined. The point of convergence for abstraction is the level of theory that must be applied to adequately resolve the problems inherent in the problem space while not applying extraneous principles that over-abstract the problem and thereby introduce unnecessary complexity. Complexity is the adversary of the software developer. The software developer must always be conscious of reducing complexity in all aspects of development. One of the main goals of object modeling is to reduce complexity. The optimal solution applies the appropriate tools of abstraction to achieve the point of convergence of abstraction that defines the inherent complexity of the problem space.


A related and serious consequence of coupling a level of abstraction that is too high relative to the inherent complexity of the problem space, is that the level of proficiency of the entire development team must be raised to that level to be effective in the development effort. This implies unnecessary added cost and time for development in the development effort. The consequence of coupling a level of abstraction that is too low relative to the inherent complexity of the problem space, is that the solution does not efficiently and / or effectively address the problems in the problem space. The only way that the inherent complexity of the problem space can be accurately evaluated is to create a problem model that defines the relative importance and order of precedence of problems that constitute the problem space. This is an essential task in determining the architecture of a complex software system.


The tools of abstraction are defined by a meta-model whose constituent abstractions include pattern models, patterns, object models, objects, and object detail. Each of these abstractions exists at a different level of abstraction, from highest to lowest in the order specified above. Each is defined as follows:


Object: An object is the incarnation in the software space that implements the state and behavior of some well-defined abstraction that the software models.


Object Detail: The object detail fleshes out the detail that gives purpose to the structural relationships between objects that are defined in the object model. The object detail implements the details of the behavior that characterizes the object. The object detail typically equates to the algorithms and logic specified in the implementation model with source code in a programming language.


Object Model: An object model defines the structural relationships and dynamic interaction between a group of related objects.


Pattern: A pattern defines a recurring solution to a recurring problem in a given context. The details for each application of the pattern can be different, but the structure, dynamics, and general approach for the solution is the same in each instance. A pattern is a template for individual object models that are the instances of the pattern.


Pattern Model: A pattern model models the relationships between patterns, such as the relative importance between patterns and the order of precedence in applying patterns. Each pattern in a pattern model fits in at an appropriate level of abstraction within the pattern model, forming a hierarchy. The pattern model maps directly to the problem model that defines the hierarchy of problems in the problem space. Pattern models represent the point of convergence in the meta-model that defines the model of abstractions that exist in modeling the abstractions involved in object modeling.