Implementing Logging as an Aspect.

Aspect Oriented Programming (AOP) is a programing paradigm, also referred to as a compliment to Object Oriented Programming (OOP). AOP tries to increase the modularity by helping in separating concerns. Let's start with a sample code with cross-cutting concern. Printing the input and output of a method is the most common practice followed by developers to debug the system. These will help the developers to trace any bug or issue faced by the user. This is clearly a cross-cutting concern. This article introduces AOP using aspectwerkz and how to implement a MethodCallTracer.

View the resource