demo: object-oriented IDE |
||
|
||
demo: modularize concern |
||
·
Show FigureEd running ·
Inspect Point.java ·
Use joinpoint probe to find |
call(void figures.Canvas.updateHistory())
&& within(*) |
|
·
Describe places that it’s called ·
create aspect (defines a special class that can crosscut other
classes) ·
aspect HistoryUpdating ·
write pointcut (has name and parameters) |
pointcut moves(): call(void
Line.setP1(Point)) || call(void
Line.setP2(Point)); |
|
·
write after advice (runs “on the way back out”) |
after() returning: move() { |
|
·
extend advice to Point setters (multi-class) |
call(void FigureElement+.set*(..)) |
|
·
capture context & use interface |
move(FigureElement fe): target(fe) &&.. |
|
·
Show structure, note that SlothfulPoint is now included ·
Run & show effect |
|
|
·
Show Point.moveBy history violoation ·
Want to make sure that sets of private fields of classes implementing
FigureElement only happen from within the set methods |
declare warning:
set(private * FigureElement+.*)
&& !(withincode(* FigureElement+.set*(..)) || withincode(FigureElement+.new(..))):
"should only assign to fields from set methods"; |
|
·
Write before advice that does precondition checking on Points. |
before(int
newValue): |
|
demo: pluggable aspects |
||
·
World’s first fully interactive video game, now 41 years old.. ·
Explain spacewar ·
Launch with Ship.java and "Release.lst" selected and compiled. |
|
|
demo: crosscutting structure |
||
• Explain
annotations over program structure • Explain
links and associations, inheritance links • Explain
model genericity, different views • Show
inline annotations • Show
history navigation |
• Show
global views (multiple views of your code) • Show
refactoring by changing helmCommandsCut • Show view
synchronization, task-oriented views • Discuss
how it is harder in AJ (implicit invocation) • Show
fluid documents (ISTL project) |
|