Does Aspect-Oriented Programming Increase the Development Speed for Crosscutting Code? An Empirical Study
Stefan Hanenberg, Sebastian Kleinschmager, Manuel Josupeit-Walter University of Duisburg-Essen, 2009 Presenter: Olivier Clerc ETH Zürich
1
the Development Speed for Crosscutting Code? An Empirical Study - - PowerPoint PPT Presentation
Does Aspect-Oriented Programming Increase the Development Speed for Crosscutting Code? An Empirical Study Stefan Hanenberg, Sebastian Kleinschmager, Manuel Josupeit-Walter University of Duisburg-Essen, 2009 Presenter: Olivier Clerc ETH Zrich
Stefan Hanenberg, Sebastian Kleinschmager, Manuel Josupeit-Walter University of Duisburg-Essen, 2009 Presenter: Olivier Clerc ETH Zürich
1
void foo() { bar(); } void bar() { baz(); } void baz() { System.out.println(“Hello, world!“); }
2
void foo() { Logger.log("foo"); bar(); } void bar() { Logger.log("bar"); baz(); } void baz() { Logger.log("baz"); System.out.println(“Hello, world!“); }
3
4
5
public aspect LoggerAspect { pointcut methodInvocation() : execution(* *(..)); before() : methodInvocation() { MethodSignature signature = (MethodSignature) thisJoinPoint.getSignature(); Logger.log(signature.getMethod().getName()); } }
Pointcut: „WHEN?“ Advice: „WHAT?“
6
7
8
9
Task # code targets Code sim.
110 ≠
36 ≠
52
=
4 =
19 =
15 =
8 ≠
6 ≠
7
=
10
11
Effect F value p value Main effect of task 55.02 ~0 Main effect of language 13.75 0.001 Interaction effect of task and language 9.85 ~0
12
13
Task # code targets Code sim.
110 ≠
36 ≠
52
=
4 =
Observers
19 =
15 =
Constraint
8 ≠
Check
6 ≠
7
=
All tasks as one
n/a n/a
14
Task # code targets Code sim. All devs
110 ≠ +
36 ≠ +
52
=
4 =
Observers
19 =
15 =
Constraint
8 ≠
Check
6 ≠
7
=
n/a n/a
Task # code targets Code sim. All devs Fast OO devs Slow OO devs
110 ≠ + +
36 ≠ +
52
=
4 =
Observers
19 =
15 =
Constraint
8 ≠
Check
6 ≠
7
=
n/a n/a
n/a
16
Task # code targets Code sim. All devs Fast OO devs Slow OO devs Fast AO devs Slow AO devs
110 ≠ + + +
36 ≠ +
52
=
4 =
Observers
19 =
15 =
Constraint
8 ≠
Check
6 ≠
7
=
n/a n/a
n/a n/a n/a
17
18
19
20