Search code examples
architectureaopaspect

Symmetric and Asymmetric in Aspect Oriented Programming


I've heard about Symmetric and Asymmetric in Aspect Oriented Programming, but I don't understand what they are. In fact, from a paper, it said:

Symmetric: All concerns are modularized with the same kind of module
Asymmetric: Different module kind for crosscutting concerns

Could you please explain in more details, and give me an example?

Thank you.


Solution

  • Asymmetric aspects means that you have 2 seperate modules;

    • your base program
    • aspects (where aspects are abstracted pieces of code that can be used in multiple places of your program, to avoid code duplication or scattering and tangling or dependencies between systems | also called crosscutting concerns)

    and you weave them together before you compile (at pre-compile time) to make your program.

    Symmetric aspects means that your concerns are abstracted in the base program modules themselves. (which can also be woven together to make your program)