Jun 19, 2007

aspect-oriented extension to C#

Eos is an aspect-oriented extension to C# programming language for Microsoft® .NET Framework™. Its programming language model is based on AspectJ-like languages. It supports modularization of crosscutting concerns by adding three constructs to C#. A concern is a dimension in which some design decision is made. Some examples of concerns are execution trace policy, use of common thread pool, security policy enforcement, caching etc. A concern is crosscutting if it cannot be realized in traditional object-oriented designs in a modular way – that is, if any implementation of the concern involves scattered and tangled code. Scattered means not localized in a module but fragmented across a system. Tangled means mingled with code for other concerns. For example, the implementation of execution trace policy is scattered across all methods of the system and tangled with the concerns implemented by the methods.

The language model of Eos adds three new constructs to C#: pointcuts, bindings, and inter-type declarations. The pointcut and inter-type declarations are similar to their counterpart in AspectJ. The pointcut select points in the execution of a program. These points are called join points in aspect-oriented terminology. The binding construct connects the join points to methods. Whenever the join point is reached in the program execution, the bound method is executed. The binding construct uses the pointcut construct to select a set of join points to connect a method. The inter-type declaration allows a third party type to add additional members and interfaces to a type without involvement of the type itself.

Source : http://www.cs.virginia.edu/~eos/doc/