tags:

views:

724

answers:

4

Please give me the advantages and disadvantages of using the particular framework.

Can give me examples of successes where you have used AOP in you .net applications?

A: 

We can use Unity 1.2 for AOP.

bovium
+1  A: 

We can use Postsharp for AOP.

bovium
+1  A: 

An older post, but might help you see some of the pro/cons of products and AOP implementations.

http://ayende.com/Blog/archive/2007/07/02/7-Approaches-for-AOP-in-.Net.aspx

Bless Yahu
A: 

So far we have used Spring.Net AOP for the classic AOP example of applying logging to an application. I have not used any of the other AOP frameworks available for .Net.

It works extremely well with no noticeable performance impact, removed a ton of excess and repetitive code from our application and improved logging coverage and the quality and consistency of logging information. Logging is now written in one place and configured in one place - a huge improvement.

There are a couple of caveats though: Spring.Net AOP requires any object to be advised to implement at least one interface; that is, if you want to log method calls to an object, that object must implement at least one interface. Also, AOP has no visibility of activity within an advised method; that is, you cannot use AOP-implemented logging to log the changing value of a variable within a method for instance.

In practice however, this is mostly a problem if you are trying to retrospectively apply AOP to an existing application. Coding to the interface is IMHO good development practice anyway and if you need to log the internal workings of your methods that may well be an indication that they need to be refactored.

AOP does require some planning to implement and does require a certain discipline in your coding practices but, like automated unit testing, IMHO this generally only serves to improve code quality.

Alfamale