Folie 1 - PowerPoint PPT Presentation

1 / 45
About This Presentation
Title:

Folie 1

Description:

ein Paradigma f r Design und Implementierung von Softwaresystemen, das neue ... IDEs like Eclipse, JBuilder, SunONE / NetBeans, Emacs and JDEE are available on ... – PowerPoint PPT presentation

Number of Views:95
Avg rating:3.0/5.0
Slides: 46
Provided by: Niko62
Category:
Tags: folie | netbeans

less

Transcript and Presenter's Notes

Title: Folie 1


1
crosscutting objects for better modularity
AspectJ
Aleksandar Nikolic Taufan Zimmer Qin Huang June
23, 2004 HdM-Stuttgart
2
Introduction
Introduction Aspect Oriented Programming(AOP)
3
Introduction
Einführung zur AOP
  • Was ist AOP?
  • Wichtige Begriffe der AOP
  • AOP vs. OOP
  • Vorteile
  • Unterstützung von Java

4
Introduction
Was ist AOP?
  • Abkürzung von Aspektorientierte Programmierung
  • ein Paradigma für Design und Implementierung von
    Softwaresystemen, das neue Arten von Modularität
    zu Verfügung stellt.
  • basiert auf Aspekten
  • an mehreren Stellen beeinflussen und somit
    durchdringen (crosscutting concerns)

5
Introduction
Wichtige Begriffe von AOP
  • Pointcuts
  • Joinpoint
  • Advices

A
d
v
i
c
e
A
u
t
h
e
n
t
i
f
i
z
i
e
r
u
n
g
T
r
a
n
s
a
k
t
i
o
n
E
i
n
z
a
h
l
u
n
g
J
o
i
n
p
o
i
n
t
K
o
n
t
o
A
u
s
z
a
h
l
u
n
g
P
o
i
n
t
c
u
t
6
Introduction
AOP vs. OOP
  • OOPBetrachten von Objekten als
    Modularisierungseinheit.Crosscuting Concerns als
    nicht modularisierbare Objekte (Aspekte)
  • AOPBetrachten von Aspekten als
    Modularisierungseinheit.Crosscutting Concerns
    als Aspekte modularisieren.
  • Debugging (Logging, Tracing, Monitoring)
  • Transaktionsbehandlung
  • Sicherheit (Authentifizierung, Autorisierung)
  • Ausnahmebehandlung

7
Introduction
AOP vs. OOP
8
Introduction
Vorteile
  • stärkere Modularisierung
  • klarere Trennung der Verantwortung
  • stärkere Wiederverwendung
  • höhere Produktivität

9
Introduction
Unterstützung mit Java
  • AspectJ von Xerox
  • HyperJ von IBM

10
Introduction
Introduction AspectJ
11
(No Transcript)
12
(No Transcript)
13
(No Transcript)
14
Introduction
The 5 lifes of AspectJ
  • Real crosscutting concerns
  • Implementation of collaboration
  • Software modification
  • Development support
  • Generative programming
  • Source Die 5 Leben des AspectJ by Markus
    Voelter and Martin Lippert

15
Introduction
The 5 lifes of AspectJ
Aspect A
Real crosscutting concerns
Aspects affect a wide range of the system.
Class
Class
Class
. . .
Class with A
Class with A
Class with A
16
Introduction
The 5 lifes of AspectJ
Aspect B
Aspect A
Real crosscutting concerns
Aspects affect a wide range of the system.
Class
Class
Class
. . .
Class with A
Class with A,B
Class with A,B
17
Introduction
The 5 lifes of AspectJ
Aspect Observable
Aspect Observer
Implementation of collaboration
Dependencies add new functionality to certain
classes.
Class
Classes
Observable Class
Observer Class
Observable Class
collaboration
Observable Classes
18
Introduction
The 5 lifes of AspectJ
AspectJ Compiler
Software modification
Aspect
Bytecode can be altered without source code.
modified Bytecode
modified Bytecode
modified Bytecode
Bytecode
19
Introduction
The 5 lifes of AspectJ
Development
Production
Aspect Tracing
Aspect Tracing
Development support
Aspects may support developers and be removed in
production.
Class
Class
Class
Class
Class
Class
Class with tracing
Class with tracing
Class with tracing
20
Introduction
The 5 lifes of AspectJ
Aspect Stored Procedures
Aspect Referential Integrity
Aspect Grid Distribution
Generative programming
Combining different aspects realizes generation
of product lines.
DB-App
DB-App with Referential Integrity Stored Proced
ures
DB-App with Referential Integrity
DB-App with Referential Integrity Stored Proced
ures Grid Distribution
21
Technology
22
Class
new function
new function
Class
Class
23
Code weaving in AspectJ
Aspect- Class
Aspect- Class
function
function
call
Class
new function
Class
Class
new function
call
new function
new function
24
Plugins for different IDEs like Eclipse,
JBuilder, SunONE / NetBeans, Emacs and JDEE are
available on the main project website. Still, the
compiler can be used with traditional command
line arguments and is therefore completely
tool-independent.
C\AJCgtajc.exe argfile default.lst_
25
Java Compiler
Java- Source
.java
javac
26
AspectJ Compiler
AspectJ Compiler
AspectJ- Source
the AspectJ compiler is both compiler and
bytecode manipulator. The compiler translates
Aspects into bytecode-classes and weaves
references to aspects into existing
bytecode. Thus, programmers dont require the
knowledge about the internal logic of the Java
Virtual Machine (JVM).
.aj
OR
27
AspectJ Compiler internal process
28
Language
Language
29
Language
30
field setjoin point
field reference join point
method call or executionjoin point
handler execution join point
constructor call or execution join point
field setjoin point
31
(No Transcript)
32
(No Transcript)
33
(No Transcript)
34
(No Transcript)
35
(No Transcript)
36
(No Transcript)
37
(No Transcript)
38
(No Transcript)
39
Conclusion
Conclusion
40
Conclusion
41
Conclusion
42
References
References
43
(No Transcript)
44
References
Authors
Aleksandar Nikolic an05_at_hdm-stuttgart.de Taufan
Zimmer tz03_at_hdm-stuttgart.de Qin
Huang qh01_at_hdm-stuttgart.de
45
Vielen Dank für Ihre Aufmerksamkeit!
Fragen
Write a Comment
User Comments (0)
About PowerShow.com