首页> 中文期刊> 《计算机与数字工程》 >观察者模式在面向抽象编程中的应用

观察者模式在面向抽象编程中的应用

         

摘要

In order to improve scalability and maintainability os software system ,a system framework must be able to build to adapt to the changing needs of the user is system design ,therefore ,in dealing with one to many dependencies in the system ,abstract oriented way of thinking is used ,the observer mode is introduced ,the change part is separated from un-change part ,an abstract class or interface is formed ,so that when an user needs change ,an abstract class or interface imple-mentation class is added without changing the original code ,thereby the robustness of the system is improved greatly the cost of software maintenance is reduced .Practice has proved that in project design ,which layer is abstracted specifically can com-bine various development platforms and make adjustments and optimization ,it is not immutable .%为了提高软件系统的可扩展性和可维护性,在系统设计时必须搭建一个可以适应用户需求变化的系统框架,因此,在处理系统中对象间一对多的依赖关系时,采用面向抽象的思维方式,引入观察者模式,把变化部分从那些不变部分里分离出来,形成抽象类或接口,这样,当用户需求发生变化时,只需增添抽象类或接口的实现类,而无需改变原来的代码,从而提高了系统的稳健性,大大降低了软件系统维护的成本。实践证明,在项目设计中,具体抽象到哪一层可以结合各个开发平台的特性而做调整和优化,并不是一成不变的。

著录项

相似文献

  • 中文文献
  • 外文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号