Aspect Oriented Programming ppt
Active In SP
Joined: Sep 2010
13-01-2011, 02:59 PM
Motivation for AOP
Typical programs often have behavior that doesn't fit into a single module.
AOP addresses behaviors that span many, often unrelated, modules.
Primary core functionality.
Central functionality of a module.
System wide concerns that span multiple modules.
Cuts across the typical division of responsibility.
OOP creates a coupling between core and crosscutting concerns.
AOP aims to modularize crosscutting concerns.
In AOP crosscutting concerns are implemented in aspects instead of fusing them into core modules.
Aspects are an additional unit of modularity.
Aspects can be reused.
By reducing code tangling it makes it easier to understand what the core functionality of a module is.
An “aspect weaver” takes the aspects and the core modules and composes the final system.
Weaving rules specify how to integrate the final system.
Can be implemented in various ways:
Source to source translation.
Bytecode enhancement, first compile source with original compiler, then weave aspects into class files.
Just-in-time weaving done by a classloader.
By the language compiler.
The JAsCo language supports runtime weaving and unweaving.