您是否使用AOP?什么呢? [英] Do you use AOP? and what for?

查看:136
本文介绍了您是否使用AOP?什么呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在面向方面编程(春,PostSharp等)非常感兴趣。我能想到的几个方法我会采用这种,主要是记录或延迟加载浮现在脑海。我希望看到其他人都用它来做什么?

I am very interested in Aspect Orientated Programming (Spring, PostSharp etc). I can think of a couple of ways I would employ this, mainly logging or lazy load comes to mind. I was hoping to see what everyone else used it for?

请列出你解决使用AOP的senarios。 (hopfully它可能会激发一些其他人把它捡起来太)

Please list out the senarios you solve using AOP. (hopfully it may inspire some one else to pick it up too)

欢呼声

推荐答案

我的职位由brd6644同意(并会投它,如果我可以)。尤其是他在日志的评论。使用方面的记录更像是跟踪。​​

I agree with the post by brd6644 (and would have voted it up if I could). Especially his comment on logging. Using aspects for logging is more akin to tracing.

有上se-radio.net 2播客的AOP。该第一,与格里高尔的采访Kiczales,谁也做了很多的AOP的研究; href="http://se-radio.net/podcast/2008-08/episode-106-introduction-aop" rel="nofollow">第二的

There are two podcasts on se-radio.net on AOP. The first, an interview with Gregor Kiczales, who has done a lot of research on AOP; the second, more recent interview with Christa Schwanninger and Iris Groher focuses on how AOP is used in practice. Both are worth a listen.

最后,要小心你如何采用AOP。过分注重AOP和你正在集中在平台上,而不是提供商业价值。我从来没有被定向到使用AOP通过一个测试用例。方面的东西我会重构一个应用程序,以消除重复的过程中引入。

Finally, be careful in how you adopt AOP. Too much focus on AOP and you are concentrating on the platform rather than delivering business value. I have never been directed to use AOP by a test case. Aspects are something I would introduce during refactoring of an app to remove duplication.

这篇关于您是否使用AOP?什么呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆