传统的面向对象设计方法在某些方面还存在着不足,如高耦合、低内聚、适应需求变化能力差等问题。设计模式理论提出软件系统的质量可以客观地衡量,优秀设计之间存在相似之处,即所谓的模式。设计模式更好地展现了面向对象设计原则,是更为优秀的面向对象设计方法。具体论述了我们在面向对象的矿产资源评价专家系统结构设计中所采用的几种主要设计模式及其优点,如适用于不同资源评价体系接口的Template Method模式,适用于不同资源量计算方法的Strategy模式和适用于兼容不同专家系统的Bridge模式等,同时指出不同的设计模式适用于不同的场合。
The traditional object-oriented design method has its drawbacks in some aspects, e. g. , tight coupling, low cohesion and poor adaptability to the change in requirements. The design pattern theory claims there exists an objective basis for software quality judgment and there are similarities between fine quality designs, that is, the so-called patterns. Design pattern can better present the objective-oriented design principles and therefore is a more excellent design methodology. The main design patterns adopted in the structural design of the objective-oriented expert system for mineral resource evaluation and their advantages are described concretely and it is pointed out that each design pattern has its own applicability. For example, pattern of Template Method is suitable for interfacing with various resource valuation systems, pattern of Strategy suitable for various calculation methods of resource amount and pattern of Bridge is compatible with different expert systems.