BT

InfoQ Homepage News Aspect Oriented Programming for Silverlight

Aspect Oriented Programming for Silverlight

Bookmarks

AOP or Aspect Oriented Programming allows developers to “weave” code fragments through their object and methods without explicitly placing the code in the class’s source. This additional code, often referred to as “advice”, is often stored in configuration files but other options exist. Probably the most widely AOP system is AspectJ, an extension for Java.

AOP has been controversial over the years. While many people swear by it for mundane tasks like security and logging, others balk at injecting code that cannot be easily viewed in the source. But even if you don’t like it, sooner or later chances are you are going to happen across code that uses it.

For .NET developers current using AOP or interested in trying it out, one option is PostSharp. PostSharp uses post-processing to add advice to classes. This involves modifying the compiled EXE or DLL to inject the necessary code fragments. For PostSharp, advice is usually indicated by Attributes.

Recently it has been announced that PostSharp 1.5 supports Silverlight 2. This CTP release also includes support for .NET Compact Framework and Novell’s Mono. Chris Koenig shows some examples of PostSharp.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.