Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 11 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
到目前为止,AOP 与框架相关联,因此您应该阅读 AOP 框架的文档,而不是一般方法。
但是我们可以指定三种常见的 AOP 类型:
大多数资源可以在这里找到:“http://csharp- source.net/open-source/aspect-oriented-frameworks”
最常见的用途是插件架构、日志记录、缓存以及一些特定于域的 AOP,例如在某个特定对象上设置一些特定属性。 AOP 中的域和状态,这样开发人员就不会关心它,除了 Presistance 层可以使用 AOP 生成 SQL 命令对象等之外。AOP
中的问题是,如果您想要超越诸如日志记录之类的常见事物,许多初级开发人员没有获得 AOP,因此我会谨慎地以特定于领域的方式使用它,如果您在一个拥有丰富经验的强大开发团队中,那么这会很好地工作AOP。
编辑:这是一个很好的 Spring AOP 教程,Spring 是一个巨大的野兽,但是一旦你学会了它,它就可以很好地工作,唯一的缺点是 xml 配置而不是流畅的配置。
So far AOP is tied to frameworks, so you should read the documentation of the AOP framework rather then general approach.
But we can specify three common types of AOP:
most resources can be found here: "http://csharp-source.net/open-source/aspect-oriented-frameworks"
The most common use is a plugin architecture, logging, caching as well as some domain specific AOP like setting some specific properties on a object that is in a certain domain and state from AOP so that the dev doesn't care about it, other than that presistance layers can use AOP to generate SQL command objects etc.
The thing in AOP is that you need to have a good understanding how the system works if you want to go beyond the common things like Logging, many junior devs don't get AOP so I would be careful with using it in a domain specific way, this will work fine if you are in a strong dev team that has lots of experience with AOP.
EDIT: Here is an good tutorial to spring AOP, Spring is a huge beast, but once you learn it it works very well, the only downside is xml configuration rather then fluent one.