Showing posts with label AspectJ. Show all posts
Showing posts with label AspectJ. Show all posts

Thursday, January 6, 2011

Aspect Oriented Programming - What is it , Why is it for me and How to do it



Enough of the Jargons ... Procedure Oriented, Object Oriented....and now
 what is Aspect Oriented Programming ?




What is Aspect Oriented Programming ?
Just imagine you have system for which you need add a set of  log statements
at the run-time. and say you should not modify the sources. How do you do it ?

OR put it in other way , say your application which is in execution needs
to be audited -say how many lines code is modified by each test case ?
This can be done by an adding a  counter in you testcase for each line
it accesses. Easy to do it at source if there are say, 10 test cases.
But , just imagine doing it for some 10000 test cases. We can simply forget
doing anything at the source level in these scenarios since this book- keeping
activity will consume lot of man-days and we would be more than happy if
we can hook something to our tests at the time of execution rather
than doing this at source level.This is exactly what AOP does for us.

AOP is very useful in cases of  are like  auditing, logging, security,
exception handling without having to modify the original business logic sources.
( Let us understand  each of these issues as "concerns" that are cross-cutting
 the breadth of the application )

---------click below on "more" for a detailed complete application --------

subversion video