Skip to main content

AOP - Aspect Oriented Programming (.Net)

Brief : Common functionality in Single Responsible classes as Core module and then use them as per different needs. DRYs out code.
Helps cross cutting concerns e.g. logging.

Functionality -> Encapsulation = Aspect(Wrapper + Single Responsible + Decorator Pattern + Open Close ) == Modular component with good OO


Where we can inject / Hoocks
On Start : immediately prior to underlying functionality
On Success : limited to when no exception
On Exit : when function finishes
On Error : when any exception occur in code

How to Attach to existing function ?
1. Interceptors
generally IoC is used. this way no post compilation - can use IoC configuration.

2. IL Code Weaving
Compile code to dll or EXE and then run through the AOP post processor. Which will inject the code as per hoocks as new dll / exe with aspects attached.

How to make an Interception and how to make aspect using it?
//to do : update



- Baljeetsingh

Comments

Popular posts from this blog

How to accept outlook meeting invite via keyboard shortcut ?

  There are two ways you can accept a meeting request. 1. when you are browsing list mail (and invite isn't opened) 2. wen you have opened the invite

Tips 'n' Tricks : SVN : Visual Studio Plugin : AnkhSvn

Now we can access SVN from Visual Studio :) ,

HTC Wildfire Gets Android 2.2 Froyo update

Yes, Thats correct HTC has quietly (brilliantly) shipped the long pending Android 2.2 - Froyo update for the HTC Wildfire . I have updated my HTC to Android 2.2. I am gonna share my experience which one should read before starting the upgrade. Statistics Pre-Requisite Process / Steps What you get? (features of Android 2.2 Froyo) What you loose?