检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:刘海青 LIU Hai-qing(Duolun Technology Corporation Ltd, Nanjing, China, 21110)
出 处:《软件》2018年第3期136-140,共5页Software
摘 要:AOP(面向方面编程),所谓"方面",简单地说,就是将那些与业务无关,却为业务模块所共同调用的逻辑或责任封装起来,便于减少系统的重复代码,降低模块间的耦合度,并有利于未来的可操作性和可维护性。目前AOP多用代理的方式实现。以Spring为例,框架在核心业务组件对象外封装一个代理对象,并且在调用方法外封装了一层调用方法,将横切业务逻辑插入外部代理对象的调用方法中,以此实现AOP逻辑。这种实现方式显得笨重而又繁琐。本文将提供一种对AOP实现方法的改进,通过对Io C容器的改进,建立核心业务组件的通用接口,通过将横切业务组件直接插入核心业务组件通用接口的方式,来实现轻量级的AOP框架。这种实现方式完全满足AOP的业务需求,远比代理方式实现简单,并且更接近于AOP其原始概念,其中的关键是改进了Io C框架核心业务组件的调用方式,建立通用调用接口。AOP(aspect oriented programming), the so-called "hand", simply said, is that nothing to do with the business, but for business logic or common module call responsibility package, to reduce duplication of system code, reduce the degree of coupling between modules, and is conducive to the future of the operability and maintainability. At present, AOP is implemented in the way of proxy. Taking Spring as an example, the framework encapsulates a proxy object outside the core business component object, and encapsulates a calling method outside the calling method, inserting crosscutting business logic into the calling method of external proxy object, so as to achieve AOP logic. This way of realizing is cumbersome and cumbersome. This paper will provide an improvement on the implementation of AOP. By improving the Io C container, we build a general interface of core business components, and achieve a lightweight AOP framework by directly inserting the crosscutting business components directly into the core business component common interface. This implementation fully meets the business needs of AOP, far simpler than the proxy mode, and is closer to the original concept of AOP. The key is to improve the calling way of the core business component of Io C framework, and establish the general calling interface.
分 类 号:TP311.11[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:3.148.229.54