首页 | 本学科首页   官方微博 | 高级检索  
     

在AOP中使用标注改进日志功能的实现
引用本文:郑汉雄,郑汉英,周晓聪. 在AOP中使用标注改进日志功能的实现[J]. 计算机工程, 2008, 34(17): 71-73
作者姓名:郑汉雄  郑汉英  周晓聪
作者单位:中山大学计算机科学系,广州,510006
摘    要:面向方面编程(AOP)可避免横切关注点对核心代码的不良影响,但AOP中的方法签名匹配模式难以精确表达系统中的横切点,使得在大中型系统中直接使用连接点匹配方式捕获某些横切点,同样会降低系统的可读性和模块化。该文以日志功能为例,研究如何使用标注来辅助AspectJ改进与日志功能相关的横切点定义,从而改善代码的可阅读性,提高程序的可维护性,并实现日志内容的可配置性。

关 键 词:面向方面编程  标注  横切关注点  日志
修稿时间: 

Implementation of Improving Logging Function in AOP by Annotation
ZHENG Han-xiong,ZHENG Han-ying,ZHOU Xiao-cong. Implementation of Improving Logging Function in AOP by Annotation[J]. Computer Engineering, 2008, 34(17): 71-73
Authors:ZHENG Han-xiong  ZHENG Han-ying  ZHOU Xiao-cong
Affiliation:(Dept. of Computer Science, Sun Yat-sen University, Guangzhou 510006)
Abstract:Aspect Oriented Programming(AOP) can be used to avoid the disadvantage to the core code caused by cross-cutting concerns. However, because the method-signature pattern of the AOP can not express the cross-cutting concerns of the system exactly, matching some cross-cutting concerns by capturing the join point directly decreases the readability and modularity of system. A method for improving the definition of cross-cutting concerns of logging is studied in this paper. Such method improves the readability and the maintainability of the program, as well as implementing the flexibility of logging content.
Keywords:Aspect Oriented Programming(AOP)  annotation  cross-cutting concerns  logging
本文献已被 CNKI 维普 万方数据 等数据库收录!
点击此处可从《计算机工程》浏览原始摘要信息
点击此处可从《计算机工程》下载免费的PDF全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号