Monday, July 02, 2007
Ayende briefly outlines the 7 approaches for interception in .NET, techniques which are used for Aspect Oriented Programming (AOP), Dependency Injection, and other methods of ensuring that the thing you write ain't the thing that runs.

This topic is dear to my heart (a little too dear!). My University research went into different interception techniques in depth, and I surveyed the different techniques and implemented a few prototypes. My main implementation was a mixture of runtime and compile-time weaving, as they gave most flexibility in the interception points that can be attached to. Other approaches typically work by subclassing, limiting you to interception of virtual member methods only.

The .NET runtime allows a few interesting points of interception, particularly if you are interested in playing around with the Profiling and Debugging API's. Things have gotten a little better now that people have written managed wrappers, but back then, those API's made my head hurt.

One day I plan to go back into that part of my writeup and pull some text into this blog. I'd also like to fully implement my injection system, especially now that the library support has improved (Cecil is superior to R.A.I.L.) and the runtime supports lightweight code-generation.

All comments require the approval of the site owner before being displayed.
Name
E-mail
Home page

Comment (HTML not allowed)