Trying to decide which path to take for my MVC application and want to follow the AOP approach. Can anyone explain the pros and cons of Unity Custom interception behavior and using Enterprise Library 6.
Experiences and lessons from real world implementation will be very helpful, thank you.
I think there is a bit of confusion there between an AOP framework and a Policy Injection pattern. One thing is using a handlers pipeline with Enterprise Library and another is using a Framework like Mono.Cecil or PostSharp to change the behaviors of a program (i.e. to weave a program) at run or compile time.
From the MSDN website:
Using custom interception/policy injection is good if you want to add support for cross-cutting concern but it has the draw back of keeping a configuration (e.g. registering) your interceptors (which in big code bases could be a problem). You should take into account the performance aspect as well. Custom interception is handled internally by EL using the RealProxy class which uses reflection to call the registered methods.
Using a pure AOP solution would be different as IL code is emitted and injected so it should have better performance too.