Presentation is loading. Please wait.

Presentation is loading. Please wait.

aspectj tools new and noteworthy Mik Kersten University of British Columbia Adrian Colyer IBM Hursley OOPSLA, October 26-27.

Similar presentations


Presentation on theme: "aspectj tools new and noteworthy Mik Kersten University of British Columbia Adrian Colyer IBM Hursley OOPSLA, October 26-27."— Presentation transcript:

1 http://eclipse.org/aspectj1..16 aspectj tools new and noteworthy Mik Kersten University of British Columbia Adrian Colyer IBM Hursley OOPSLA, October 26-27 2004, Vancouver

2 http://eclipse.org/aspectj2..16 good modularity socket creation in Tomcat –colored lines show relevant lines of code –fits nicely into one package (3 classes)

3 http://eclipse.org/aspectj3..16 pretty good modularity class loading in Tomcat –colored lines show relevant lines of code –mostly in one package (9 classes)

4 http://eclipse.org/aspectj4..16 not so good modularity logging in Tomcat –scattered across the packages and classes –error handling, security, business rules, …

5 http://eclipse.org/aspectj5..16 the cost of tangled code redundant code –same fragment of code in many places difficult to reason about –non-explicit structure –the big picture of the tangling isn’t clear difficult to change –have to find all the code involved –and be sure to change it consistently

6 http://eclipse.org/aspectj6..16 the aop idea crosscutting is inherent in complex systems crosscutting concerns –have a clear purpose –have a natural structure so, let’s capture the structure of crosscutting concerns explicitly... –in a modular way –with linguistic and tool support

7 http://eclipse.org/aspectj7..16 The role of tool support IDE tools make code easy to navigate –Reference structure embedded In the code –Declaration lookup –Structured search But inheritance structure can be hard to extract by reading code alone –Especially in large systems –E.g. who overrides this method?

8 http://eclipse.org/aspectj8..16 Join points Key points in program execution –method & constructor execution –method & constructor call –field get & set –exception handler execution –static & dynamic initialization –… Demo… :Lineend1:Point moveBy(int, int) setX(int) setY(int) moveBy(int, int) setX(int) setY(int) end2:Point

9 http://eclipse.org/aspectj9..16 demo 1.2 tools demo Figures –Core language Spacewar –Build configs Monitorlib –Aspect libraries & bytecode weaving WSIF –Visualizer AJDoc

10 http://eclipse.org/aspectj10..16 AspectJ 1.2 tools suite IDE plugins –AJDT for Eclipse (up to 3.0) –JBuilder (up to X) –NetBeans (up to 3.4.2) –Emacs Other tools –Command line incremental compiler –Bytecode weaver –AJDoc –Ant task –AspectJ Browser

11 http://eclipse.org/aspectj11..16 Making do without AOP support You’re already working with crosscutting structure –J2EE’s XML descriptors, generative programming –Structured search and refactoring tools can help But it’s not explicit

12 http://eclipse.org/aspectj12..16 Exposing crosscutting structure AspectJ express crosscutting directly Direct semantics enable good tool support –Crosscutting structure is explicit –Editor, views, documentation, … Demo: auxiliary aspects, views…

13 http://eclipse.org/aspectj13..16 AOP reduces system complexity Aspects are a new language mechanism, so there is a learning curve But with good tool support AOP programs are easier to understand than their OO counterparts

14 http://eclipse.org/aspectj14..16 What’s next? Java 5 support Refactoring –Java refactorings will update aspects –AspectJ refactorings –Aspect-oriented refactorings will help with migration and evolution Structure views –Everywhere you see OO structure you see the corresponding AO structure

15 http://eclipse.org/aspectj15..16 Other AOP tools AspectJ language compilers –ajc: production, IDE integration –abc: research, optimization XML language compilers –AspectWerkz –JBoss AOP –Spring Joint point models, pointcuts, and advice are the common to each of these

16 http://eclipse.org/aspectj16..16 AspectJ credits Versions 0.1-1.1 developed at PARC Eclipse.org Technology project AspectJ team –Andy Clement, Adrian Colyer, Erik Hilsdale, Wes Isberg and Mik Kersten AJDT team –Matt Chapman, Andy Clement, Adrian Colyer, Mik Kersten and Julie Waterhouse http://eclipse.org/aspectj http://eclipse.org/ajdt


Download ppt "aspectj tools new and noteworthy Mik Kersten University of British Columbia Adrian Colyer IBM Hursley OOPSLA, October 26-27."

Similar presentations


Ads by Google