GoF23中Observer设计模式的AOP实现与OOP实现的对比  被引量:3

Comparative Implementation of AOP and OOP on GoF23 Observer Design Pattern

在线阅读下载全文

作  者:董荣辉[1] 丁政建[1] 曾天慧[1] 

机构地区:[1]兰州理工大学计算机与通信学院,730050

出  处:《微计算机信息》2006年第05X期225-227,219,共4页Control & Automation

基  金:甘肃省自然科学基金资助项目(ZS031-A25-015-G)

摘  要:GoF23中的Observer模式定义了一个一对多的依赖关系,当一个对象状态改变时,所有依赖该对象的对象都被通知并且自动执行更新操作。Observer模式的OOP实现方案中,模式的实现代码与模式的参与者代码混合在一起,容易产生代码缠结和代码分散等诸多问题。利用AOP技术能很好的将系统中模式实现的代码封装在一个独立的模块中,从而使得程序的模块化程度和可复用性得到改善。In GoF23, the Observer pattern is to "define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically". Traditionally OOP implements of the Observer pattern tangle the pattern implements codes with pattern participant codes together. Using AOP, the implementation of the pattern can be wrapped into one individual module. By this way the modularity and reusability of the whole system will be greatly improved.

关 键 词:设计模式 OOP AOP 

分 类 号:TP311[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象