Project Description
The LOOM.NET project aims to investigate and promote the usage of AOP in the context of the Microsoft .NET framework.
The concept of aspect-oriented programming (AOP) offers an interesting alternative for the specification of non-functional component properties (such as fault-tolerance properties or timing behaviour), as well as other crosscutting concerns. These are implemented as so-called aspects and at some point "weaved" to the other functional parts of the software.
The LOOM.NET approach is an approach that offers both: a static and a dynamic aspect weaver. The project was started in 2001 with the advent of Microsoft.Net and subsequently we released the first available aspect weaver for .NET. Like no other AOP-frameworks LOOM.NET significantly influences the Microsoft.NET AOP community.
How it works
Realized as a class library, LOOM.NET allows the language-independend definition of aspect code in the form of standard .NET classes. Both aspect weavers are fully binary compatible. Aspects written for Rapier-LOOM.NET would work with Gripper-LOOM.NET and vice versa.
An aspect class is a special .NET class with methods constructors and fields as well. At defined join points an aspect class becomes interwoven with a target class. Interweaving, strictly speaking, means that an aspect method will be interwoven with a target class method. The aspect method itself contains the aspect code and is defined within the aspect class. It has a special aspect method attribute applied. This aspect method attribute declares a method in the aspect class as an aspect method. Not necessarily every method in an aspect class is an aspect method and has this attribute applied. Methods without this attribute will not be considered for the weaving process.
A target class is a regular .NET class. The one and only restriction is that target class methods (which should become interwoven) either have to be virtual or to be defined via an interface. The weaving process will be initiated during runtime with a factory. Instead of using the new operator one uses the weavers factory method to produce interwoven objects.