Presentation is loading. Please wait.

Presentation is loading. Please wait.

University of British Columbia Software Practices Lab Fluid AOP Join Point Models Terry Hon Gregor Kiczales.

Similar presentations


Presentation on theme: "University of British Columbia Software Practices Lab Fluid AOP Join Point Models Terry Hon Gregor Kiczales."— Presentation transcript:

1 University of British Columbia Software Practices Lab Fluid AOP Join Point Models Terry Hon Gregor Kiczales

2 Fluid AOP - Terry Hon & Gregor Kiczales 2 Fluid AOP Modularization of crosscutting concerns in IDE Aspect is alternative view –modularizes crosscutting concern –can be generated each time it is needed –or can be stored as a metaobject

3 Fluid AOP - Terry Hon & Gregor Kiczales 3 Fluid vs. Linguistic AOP Linguistic AOP –Aspects are programming language constructs –Defined semantics: only execution is woven Fluid AOP –Aspects are IDE constructs It may look like programming language constructs –Defined semantics: IDE view is explicitly woven

4 Fluid AOP - Terry Hon & Gregor Kiczales 4 Experiments in Fluid AOP JPMs 2 Fluid AOP Join Point Models –What are join points? –How are they identified? –How is crosscutting combined? Using Eclipse Edit time weaving

5 Fluid AOP - Terry Hon & Gregor Kiczales 5 1 st JPM – Block Linking Join points –Code fragments in java files Method Constructor Field Means of identifying join points –Pointcuts: method, field or constructor signatures, type patterns Means of combining crosscutting –Identical blocks –All linked, any block can be edited

6 Fluid AOP - Terry Hon & Gregor Kiczales 6 Display Updating Aspect Canonical AspectJ example public aspect DisplayUpdating pointcut change: execution(public void Shape+.set*(*)) after returning: change { } Note has no advice/pointcut parameters

7 Fluid AOP - Terry Hon & Gregor Kiczales 7 Intertype Declarations Want to add a Display field for each Shape class Instead of calling static update method, we will call update on the Display object public aspect DisplayUpdating pointcut change: execution(public void Shape+.set*(*)) after returning: change { display.update(); } declare for Shape: { protected Display display; }

8 Fluid AOP - Terry Hon & Gregor Kiczales 8 1 st JPM – Block Linking Join points –Code fragments in java files Method Constructor Field Means of identifying join points –Pointcuts: method, field or constructor signatures, type patterns Means of combining crosscutting –Identical blocks –All linked, any block can be edited

9 Fluid AOP - Terry Hon & Gregor Kiczales 9 2 nd JPM – Overlay Join points –Code fragments in java files Method Constructor Means of identifying join points –Pointcuts: method or constructor signatures, type patterns Means of combining crosscutting –Join points are all different –Editable merge

10 Fluid AOP - Terry Hon & Gregor Kiczales 10 Identical parts in join points Variable references (with different names) in join points

11 Fluid AOP - Terry Hon & Gregor Kiczales 11 Block Linking vs. Overlay Crosscutting effects are identical No context of JPs in aspect Edit in linked advice block Can recreate aspect by code inspection without Fluid AOP tool Crosscutting effects can be different Some context of JPs in aspect Edit in linked merged structure Cannot recreate aspect unless we know list of JPs

12 Fluid AOP - Terry Hon & Gregor Kiczales 12 Current Questions Block Linking JPM What happens when a developer changes an advice body outside of the aspect file? What happens if an advice body is deleted? Overlay JPM What are rules for merging and overlaying? How should overlay look?

13 Fluid AOP - Terry Hon & Gregor Kiczales 13 Open Issues What are other JPMs in Fluid AOP? –What is the best way to show a ccc (modularizing both viewing and editing of JPs)? Possible intermediate step in AOP adoption or AOP solution qua itself? –Java tools can be used on all but aspect files –Aspect files are only meta files –Edit time weaving

14 Fluid AOP - Terry Hon & Gregor Kiczales 14 Related Work Linked editing –Toonim et. al.: CodeLink –Miller et. al.: Simultaneous Editing Editable virtual views –Chu-Carroll et. al.: VSC –Janzen et. al: Decal –Quitslund: MView Linguistic –Harrison et. al.: CME –Quitslund et. al.: Java Traits

15 University of British Columbia Software Practices Lab Questions? Fluid AOP Join Point Models Terry Hon tyehon@cs.ubc.ca


Download ppt "University of British Columbia Software Practices Lab Fluid AOP Join Point Models Terry Hon Gregor Kiczales."

Similar presentations


Ads by Google