1

I'm wondering what's good out there for AOP / crosscutting in .Net, along the lines of AspectJ. I see Microsoft has a Policy Injection Application Block; any other good stuff out there I should take a look at?

Grigori Melnik
  • 4,067
  • 2
  • 34
  • 40
larryq
  • 15,713
  • 38
  • 121
  • 190

7 Answers7

4

PostSharp is probably the most popular option, although I believe Sprint.NET is fairly widespread, as well.

kwill
  • 3,211
  • 1
  • 16
  • 18
Reed Copsey
  • 554,122
  • 78
  • 1,158
  • 1,373
  • Here's a link to my notes on an AOP/PostSharp presentation by Michael Hall, if anyone's interested: http://www.truewill.net/iacodecamp2009/hall.htm – TrueWill Jan 09 '10 at 01:41
2

I use Microsoft Unity but there is also StructureMap, Spring.NET, Castle Windsor and, the most popular, PostSharp.

jason
  • 236,483
  • 35
  • 423
  • 525
  • PostSharp is certainly AOP, but I'd call Unity and StructureMap IoC Container frameworks. Windsor and Spring do IoC and more, I think. – TrueWill Jan 09 '10 at 01:38
  • Both Unity an StructureMap have capabilities for AOP (see the links I provided for some examples). Depending on the problem trying to be solved, they are viable solutions. – jason Jan 09 '10 at 13:06
2

Let's not forget LinFU. Scott Hanselman did a great interview about it, including a lot of basics of AOP.

Pat
  • 16,515
  • 15
  • 95
  • 114
1

I know of PostSharp which seems to be doing a lot of AOP-things really well using attributes.

cwap
  • 11,087
  • 8
  • 47
  • 61
1

Spring.Net has an AOP framework which can be used with or without Spring's IoC framework. If you are also looking for an IoC framework, Spring.Net makes a compelling case and is free and open source.

Another plus for Spring.Net IMO is that the documentation and forum support really is excellent. One negative comment about Spring.Net that I have seen several times is that the XML configuration is wordy and difficult to read, which is true. It is however at least consistent so that once you have learned how it works for one block, you can apply it easily to other blocks.

Alfamale
  • 1,069
  • 1
  • 9
  • 13
0

Delphi Prism has compiler support for AOP

http://prismwiki.codegear.com/en/Cirrus

Mosh
  • 121
  • 2
0

Interception extension for Microsoft Unity gives you some AOP. In addition, see Policy Injection as one of the out-of-the-box interception behaviours.

Good examples and tutorials are included in this set of Hands-on Labs.

Grigori Melnik
  • 4,067
  • 2
  • 34
  • 40