60 likes | 209 Views
AOS ‘03. Aspect-Oriented Programming. 3 Usages of aspects. Separation of Cross-cutting concerns (multiple functionality at the same joinpoint of the code) Integration Own/3rd party code with generated code Of code layers - ie. the phases of a compiler
E N D
AOS ‘03 Aspect-Oriented Programming
3 Usages of aspects • Separation of Cross-cutting concerns (multiple functionality at the same joinpoint of the code) • Integration • Own/3rd party code with generated code • Of code layers - ie. the phases of a compiler • Code consistency check (eg. no direct field access, only use of factories)
AOP tools dimensions (6 out of 19) • Dynamic vs. static • Pr. instance vs. pr. type • SOCC vs. multidimensional SOCC • Query lang. for pointcut specs. • usually weak for dyn. lang. and strong for static • Targets programs vs. Enterprise
Recent trends in the community • More abstract pointcut specification/ joinpoints • programs are too vulnerable to • extensions (aspects won’t hit) • changes (ceases to hit) • Dynamic and pr. instance aspects
Problems • The greatest advantage of AOP is that at any point in the source code it is impossible to see all the code, which is to be executed. At the same time the greatest disadvantage of AOP is that at any point in the source code it is impossible to see all the code, which is to be executed. [bkg;2002] • especially when the aspects relies on each other, hence are not completely separated
AOP language approaches • Language extension to existing languages • +reuse compiler, debugger, editors etc. • +Easy, most concepts are already defined and implemented • Difficult due to bad error messages since the code has been mutated behind the programmers back • New language • Start from scratch, but allows radical thinking • more natural error messages