What is Nu?Nu (pronounced new) is a novel aspect-oriented programming (AOP) model. Nu differs from other AOP approaches in that there are no new language constructs. Instead, the Nu model provides an invocation mechanism Bind. Using this invocation mechanism, you can emulate most constructs in the prevalent aspect-oriented programming techniques, such as AspectJ, Eos, Adaptive Programming, Composition Filters, HyperJ, etc. You can even emulate your own domain specific aspect language. We provide examples in the Nu distribution that shows how you can emulate the programming style of other AOP techniques. The invocation mechanism Bind consists of two primitives, bind and remove. Each of these primitives takes two arguments: a pattern and a delegate. The pattern is used to identify join points in a program. A join point in aspect-oriented terminology is a point in the execution of the program. The delegate here is the same as .NET Framework delegates. A delegate (or a delegate chain) can be thought of as an equivalent of function pointer in unsafe languages such as C and C++. A delegate points to a list of methods (also called delegatees). The invocation of the delegate causes each of these methods to execute in the order in which they were added to the delegate chain. When you execute the bind primitive, from that point onwards, the delegate is invoked at all join points that match the pattern. Executing the remove primitives eliminates this invocation. Current version of Nu is targeted towards the .NET Framework; however, in future we plan to have Java versions as well. Nu doesn't require you to change your IDE, you can compile your program in existing visual studio by simply adding a post-build phase to your build process. |