摘要
面向方面编程分离了核心关注点和横切关注点,提供了模块化横切关注点的机制,很好地解决了面向对象技术处理横切关注点时存在的代码散布和代码纠缠问题。和日记记录、安全验证等业务一样,持久化也被认为是经典的横切关注点业务,适合用AOP来实现。分析了现有的基于AOP的持久化实现,发现大部分实现过于追求AOP要求的obliviousness特性,而在功能或性能上难以满足现实应用的需求。探讨了持久化的特点及持久方面化的机制,提出了一套实用的基于AOP的持久化框架。该框架保持了面向对象持久化技术的功能及性能,同时又具有方面化持久业务所带来的更高的可重用性、可维护性及可移植性。
By separating cross-cutting concerns from core concerns and supplying additional mechanisms to modularize cross-cutting concerns, aspect oriented programming gracefully solves the problem of code scatting and code tangling coming across when object oriented technique deals with cross-cutting concerns. Just like logging and secure authentication,persistence is considered as a kind of classic cross-cutting concerns and suited to be dealt with using AOP. After analyzing state-of-the-art persistence frameworks or implementations, we found most of them cared too much about the obliviousness property which is inherent in AOP and hard to meet the need of actual applications either in functionality or performance. A practical framework of object persistence was proposed after probing into characters of persistence and mechanisms of aspectizing persistence. The framework not only preserved functionality and performance achieved by object oriented solution, but also wined higher reusability,maintainability and portability by aspectizing persistence.
出处
《计算机科学》
CSCD
北大核心
2010年第8期146-151,共6页
Computer Science
基金
广东省自然科学基金自由申请项目资助