What%20is%20AOP? - PowerPoint PPT Presentation

About This Presentation
Title:

What%20is%20AOP?

Description:

What is AOP? Once More Around the Wheel Gregor Kiczales AspectMentor.com and University of British Columbia Consider developing a simple drawing application ... – PowerPoint PPT presentation

Number of Views:119
Avg rating:3.0/5.0
Slides: 20
Provided by: csUbcCag
Category:
Tags: 20aop | 20is

less

Transcript and Presenter's Notes

Title: What%20is%20AOP?


1
What is AOP?
Once More Around the Wheel
  • Gregor Kiczales
  • AspectMentor.com and
  • University of British Columbia

2
  • Consider developinga simple drawing application
    (JHotDraw)

3
objects are intuitive
  • Intuitively thinking of objects?
  • Points, Lines
  • Drawing surfaces
  • GUI Widgets

4
objects are not intuitive
objects are intuitive
  • In 1969 most programmers would have used
  • this has poor design and code modularity!

2 4


22 12
65 93
43 29
86 65






6 7 5 8


5
not intuitive
  • OOP invented in 1961
  • about same time as structured programming
  • term object-oriented programming in 1967
  • to make simulation code look like the model

6
  • What is OOP?
  • a way of thinking
  • objects, classification hierarchies
  • supporting mechanisms
  • classes, encapsulation, polymorphism
  • allows us to
  • make code look like the design
  • improves design and code modularity
  • many possible implementations
  • style, library, ad-hoc PL extension, integrated
    in PL

many other benefits build on these
7
OOP
MVC
Observer Pattern
fair design modularitybut poor code modularity
8
OOP
MVC
Observer Pattern
  • Meanwhile back at the ranch
  • starting in early 80s (perhaps earlier)
  • others began work on
  • crosscutting structure
  • mechanisms
  • behavioral reflection, metaobject
    protocols,subject-oriented programming
  • aspect-oriented programming term in 1997

9
aspect ObserverPattern private Display
Shape.display pointcut change()
call(void figures.Point.setX(int))
call(void Point.setY(int)) call(void
Line.setP1(Point)) call(void
Line.setP2(Point)) call(void
Shape.moveBy(int, int)) after(Shape s)
returning change()
target(s) s.display.refresh()
1
ObserverPattern
10
aspect ObserverPattern private Display
Shape.display pointcut change()
call(void Shape.moveBy(int, int))
call(void Shape.set(..)) after(Shape s)
returning change()
target(s) s.display.refresh()
1
ObserverPattern
well-definedcrosscutting structure
11
Ask yourselfcould you name asingle class
ObserverPattern ?
aspect ObserverPattern private Display
Shape.display pointcut change()
call(void Shape.moveBy(int, int))
call(void Shape.set(..)) after(Shape s)
returning change()
target(s) s.display.refresh()
1
ObserverPattern
well-definedcrosscutting structure
12
  • What is AOP?
  • a way of thinking
  • aspects, crosscutting structure
  • supporting mechanisms
  • join points, pointcuts, advice
  • allows us to
  • make code look like the design
  • improve design and code modularity
  • many possible implementations
  • style, library, ad-hoc PL extension, integrated
    in PL

13
  • Other Aspects
  • design patterns Google AOP design pattern
  • Swing thread safety AspectJ in Action
  • policy enforcement
  • authentication, synchronization, architecture
  • transaction management
  • debugging support
  • logging (of course)
  • and many application-specific aspects

14
  • IBM reports
  • implementation of platform policies
  • 15-30 quality improvements
  • significant productivity gains
  • improvements in modularity of complex software
  • new business opportunities

15
  • Issues
  • good vs. bad uses
  • can overuse/misuse any mechanism
  • we have learned a lot, we need to learn more
  • over hype, bad pedagogy
  • each new wave of adoption brings new zealots /
    critics
  • some old lessons need to be rediscovered
  • tools
  • quality, support
  • training, organization structure
  • whats the business value?

16
  • Issue Proper Style
  • mechanisms can be misused
  • too many or wrong procedures
  • too many or wrong classes
  • too much or wrong overriding
  • too many or wrong aspects, advice, introductions
  • we already know a lot
  • 15 rule, well-defined crosscutting, tool support
  • we have a lot to learn
  • interaction w/ JSR-175 more semantic pointcuts
  • scaling

17
  • Issue Implementation Quality
  • implementations vary gt 10x in performance!
  • range of existing strategies
  • VM-based implementation just now starting
  • limited existing benchmarks
  • but this is getting better fast

18
  • Issue Over-stated claims, bad pedagogy
  • each wave of interest / adoption
  • new proponents and critics
  • have different priorities
  • but must re-learn old lessons
  • new generations of proponents
  • can be too optimistic
  • new generations of teachers
  • can miss critical insights
  • new generation of critics
  • can miss previously discussed issues

19
  • Question for panelHow can Java Platform remain
    1 for AOP?
  • what are the next steps?
  • how does really new technology get in?
  • what are the technical issues?
  • how can AOP get proven enough
  • what are market issues?
  • is AOP disruptive technology for J2EE?
  • where does it produce significant value?
  • what will Redmond do?
Write a Comment
User Comments (0)
About PowerShow.com