AOP:General Introduction
Comparison OOP and AOP. AOP 2 complement OOP. Don’t oversimplify.
Common vocabulary: Service layer – business service – data access layer – dao – repository – web layer. Also patterns.
(Speaks in a quite strange manner. Somehow I can imagine him ~20 years older with a long beard speaking the same way).
Mismatch between common vocabulary and implementation => solution is abstraction of the vocabulary and reduce every requirement to one code module.
No way to express the layer abstraction with a programming language like Java. Pointcuts do. E.g. service layer should be transactional.
Advices. @AfterThrowing (AspectJ 5). Good practice: Mention pointcut here (for reuse).
AspectJ 5 Expression language.
Argument binding, e.g. @AfterThrowing(throwing="hibernateException", pointcut="MyApp.dataAccessOperation()")
Aspects like classes, Advices live in Aspects.
<aop:autoproxy />-Switches AspectJ-support on.
AOP with Spring and Java < 1.5. E.g. for existing code. "Volatility" of pointcuts – stability of advices.
Spring 2.0: @Repository + DAO (? ###check annotation###)
ProceedingJoinPoint
Argument binding better than join point parsing; around advice needs 1st arg ProceedingJoinPoint.
Idempotent operations: Runtime.RUNTIME_RETENTION_POLICY arg. => ###read###
AspactJ language extension, e.g. public aspect SystemArchitecture {}
(Example requirement: no calls to the web layer). AJDT.
declare warning/error – example to check architectural rules even by preventing the programmer from compile the code.
Spring 2.0 integration – still AOP proxy. Mostly different pointcut definition language extended. Also along with Spring AOP.
=>openJPA ###check###
AspectJ for policy enforcement/exploration, infrastructure/domain
Schreibe einen Kommentar