Contents tagged with AOP
-
RockNUG IoC Container Presentation Wrapup
I want to thank the fine folks at the Rockville .NET Users Group (RockNUG) and Dean Fiala for giving me the opportunity to speak last night. It was a record crowd last night, so I'm glad that people were interested in Loose Coupling, Design Patterns, Test Driven Development, Behavior Driven Development and Inversion of Control containers. I hope everyone got some good information, and if not interested in using containers, design patterns and such, at least know they exist and have their use. Based on the feedback I've already received, it was warming and why I like presenting at user groups, so that both of us can learn.
Once again, I'd like to plug my DC ALT.NET group that I run. Our next meeting is scheduled for April 23rd and the topic will be Continuous Integration with Jay Flowers. We'll announce the location shortly for our group. You can go ahead and sign up for our mailing list here.
Anyhow, here are some resources that can help point you in the right direction. This includes articles, blogs and such that I find will be useful in your journey to better understand these things:
- Articles
- Blogs
- Books
-
Understanding AOP in .NET
In my previous posts I have talked a bit about Inversion of Control (IoC) containers with respect to Interception and Aspect Oriented Programming (AOP). It's not only important to understand the uses and strategies for implementing your solutions using it, but also how interception and AOP works deep down in .NET. Instead of a long, drawn out post, I think I'll just include some articles and posts that do a very good job of explaining some of the ideas behind it.
Articles and Posts
I think it'd be good if we just start out with some basic MSDN articles and such regarding AOP and interception. Some of them may be older but the concepts will still apply to this day:
- 7 Approaches for AOP in .NET
Ayende covers a few ways of doing AOP in .NET using existing frameworks
- Decouple Components by Injecting Custom Services into Your Object's Interception Chain
Juval Lowy, in the March 2003 MSDN magazine, writes about using contexts for an object's execution scope and intercepting calls to and from that object.
- Aspect Oriented Programming (September 2005 Technical article)
Matthew Deiters describes aspect oriented programming and covers joinpoints, pointcuts, advice and mixins with regards to a simple example using VB.NET.
- AOP: Apsect Oriented Programming Enables Better Code Encapsulation and Reuse
Dharma Shukla, Simon Fell and Chris Sells write in the March 2002 MSDN Magazine with regards to the history to COM and AOP and then relate how it works in .NET. Rather dated article but the foundations still apply.
- AOP using System.Reflection.Emit
Roberto Loreto writes on CodeProject how to intercept method calls of an external type and generating method proxies by using Intermediate Language (IL) injection.
Just Read the Code
There are many AOP frameworks out there in the wild right now for .NET. To understand them pretty well, it's best if you just crack open the code and follow the unit tests. Most of these are no longer active. Let's cover some of the AOP frameworks out there:
- PostSharp
- NKalore (No longer active)
- Gripper LOOM.NET
- Rapier LOOM.NET
- AOP.NET (No longer active)
- Aspect# (No longer active)
- AspectDNG
Conclusion
For those willing and able to go ahead and learn about AOP, it's actually quite interesting. it's also quite a challenge especially when dealing with IL emitting. Go ahead and look at the source code and samples and give some of it a try. Next time we pick up, I'll be talking about AOP in the Enterprise and Spring.NET. Until next time...
- 7 Approaches for AOP in .NET