SE - AOP

  1. Example of some cross cutting concerns
    • Logging and monitoring
    • Caching
    • Network communication
    • Exception Management
    • Configuration and State Management
    • Security
  2. Non AOP solutions to cross-cutting concerns
    • Mix-in classes
    •   - Multiple inheritance
    •   - Dependency injection
    • Behavioural design patterns
    •   - Visitor
    •   - Template method
    • Frameworks (domain specific)
  3. Why are mix-in classes and design patterns imperfect solutions to cross cutting concerns?
    Requires a given class to manually call the cross-cutting method(s)
  4. Problems with frameworks for cross-cutting concerns
    • Requires devs to learn new techniques for each solution
    • No obvious solution to concerns not in framework
  5. Three key steps in AOP
    • Aspectual decomposition
    • Concern implementation
    • Aspectual recomposition
  6. What is aspectual decomposition?
    Identifying the cross-cutting concerns
  7. What is concern implementation?
    Creating the aspects (in code)
  8. What is aspectual recombination?
    Weaving the aspects and the code together
  9. Benefits of AOP
    • Modularize cross-cutting concerns
    • Easier to evolve systems
    • More code reuse
    • Late binding of design decisions
  10. What is an aspect?
    • The module that contains a cross-cutting concern
    • Like a class file
  11. What is a joinpoint?
    • A point in program execution where an aspect can be run
    • Can be a method or a variable
  12. What is advice?
    When a pointcut should execute
  13. Example of advice (types)
    • Before
    • After
    • After-Returning
    • After-Throwing
    • Around
  14. How is the after-returning advice different from the after advice?
    After-returning runs regardless of outcome
  15. What is a pointcut?
    All the points in code where an aspect will run
Author
Ant
ID
359744
Card Set
SE - AOP
Description
Updated