Home
Flashcards
Preview
SE - AOP
Home
Get App
Take Quiz
Create
Example of some cross cutting concerns
Logging and monitoring
Caching
Network communication
Exception Management
Configuration and State Management
Security
Non AOP solutions to cross-cutting concerns
Mix-in classes
- Multiple inheritance
- Dependency injection
Behavioural design patterns
- Visitor
- Template method
Frameworks (domain specific)
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)
Problems with frameworks for cross-cutting concerns
Requires devs to learn new techniques for each solution
No obvious solution to concerns not in framework
Three key steps in AOP
Aspectual decomposition
Concern implementation
Aspectual recomposition
What is aspectual decomposition?
Identifying the cross-cutting concerns
What is concern implementation?
Creating the aspects (in code)
What is aspectual recombination?
Weaving the aspects and the code together
Benefits of AOP
Modularize cross-cutting concerns
Easier to evolve systems
More code reuse
Late binding of design decisions
What is an aspect?
The module that contains a cross-cutting concern
Like a class file
What is a joinpoint?
A point in program execution where an aspect can be run
Can be a method or a variable
What is advice?
When a pointcut should execute
Example of advice (types)
Before
After
After-Returning
After-Throwing
Around
How is the after-returning advice different from the after advice?
After-returning runs regardless of outcome
What is a pointcut?
All the points in code where an aspect will run
Author
Ant
ID
359744
Card Set
SE - AOP
Description
Updated
2022-10-31T03:02:06Z
Show Answers
Home
Flashcards
Preview