.NET AOP(一)七种AOP实现方法
来源:互联网 发布:非诚勿扰全灭灯的软件 编辑:程序博客网 时间:2024/06/05 14:12
7Approaches for AOP in .Net
AOP在 .NET中的七种实现方法
Here are all the ways that I can think of to add AOPto your application. This mostly focus on the interception sideof things,because once you have that, everything else it just details.
在这里列表了我想到的在你的应用程序中加入AOP支持的所有方法。这里最主要的焦点是拦截,因为一旦有了拦截其它的事情都是细节。
Approach
方法
Advantages
优点
Disadvantages
缺点
Remoting Proxies
远程代理
Easy to implement, because of the .Net framework support
容易实现,因为有.NET框架的支持。
Somewhat heavyweight
Can only be used on interfaces or MarshalByRefObjects
微显重量级
仅在接口或MarshalByRefObjects 上使用
Derivingfrom ContextBoundObject
从ContextBoundObject 派生
Easiest to implement
Native support for call interception
很容易实现
原生支持调用拦截
Very costly in terms of performance
非常昂贵的性能代价
Compile-time subclassing
( Rhino Proxy )
编译时子类化
Easiest to understand
很容易理解
Interfaces or virtual methods only
仅用于接口或虚方法
Runtime subclassing
( Castle Dynamic Proxy )
运行时子类化
Easiest to understand
Very flexible
很容易理解
非常灵活
Complex implementation (but alreadyexists)
Interfaces or virtual methods only
复杂的实现(已经实现)
仅用于接口或虚方法
Hooking into the profiler API
( Type Mock )
分析 API钩子
Extremely powerful
极端强大
Performance?
Complex implementation (COM API, require separate runner, etc)
性能未知
复杂实现(COM API,需要单独运行等)
Compile time IL-weaving
( Post Sharp / Cecil )
编译时 IL织入
Very powerful
Good performance
非常强大
良好的性能
Very hard to implement
实现非常困难
Runtime IL-weaving
( Post Sharp / Cecil )
运行时 IL织入
Very powerful
Good performance
非常强大
朗好的性能
Very hard to implement
实现非常困难
http://www.cnblogs.com/tenghoo/archive/2010/12/22/aop.html#commentform点击打开链
- .NET AOP(一)七种AOP实现方法
- .NET AOP(一)七种AOP实现方法
- .Net AOP (四)EnterpriseLibary 实现方法
- .Net AOP (四)EnterpriseLibary 实现方法
- AOP系列:.NET中AOP的几种实现方案
- .Net AOP(五) 各种IoC框架下实现AOP
- .Net AOP(五) 各种IoC框架下实现AOP
- .NET :消息与AOP(一)
- C# AOP微型框架实现(一)
- Spring中AOP的实现 (一)
- 容器+AOP 实现动态部署(一)
- spring aop的实现方式(一)
- Java实现简单的AOP(一)
- [Spring]一步步实现Spring AOP(一)
- Spring中AOP的实现 (一)
- 实现简易的AOP框架(一)
- Mono.Cecil 初探(一):实现AOP
- 在.Net中关于AOP的实现 (一)
- 【Spring MVC】Spring MVC原理
- 百度地图API的IP定位城市和浏览器定位(转)
- #NOIP 2014# day.1 T2 联合权值
- 【代码笔记】iOS-UILable高度自适应(sizeWithFont)
- leetcode 刷题题解(c++) 3. Longest Substring Without Repeating Characters (快慢指针,字符hash)
- .NET AOP(一)七种AOP实现方法
- odoo中根据模型生成viwe视图的框架代码
- 安卓开发板——网口通信
- 桥接模式
- mysql储存引擎innodb
- Java实现简单AES RSA加密
- SpringMVC的Controller方法参数
- 浅尝JMX
- FreeMarker中<#include>和<#import>标签的区别