Die Präsentation wird geladen. Bitte warten

Die Präsentation wird geladen. Bitte warten

Aspect-Oriented Programming: Fad or the Future

Ähnliche Präsentationen


Präsentation zum Thema: "Aspect-Oriented Programming: Fad or the Future"—  Präsentation transkript:

1 Aspect-Oriented Programming: Fad or the Future
Karl Lieberherr Northeastern University UBS AG

2 AOP: Factoring out similarities that cut across abstractions
Specific behavior 1 Adapters s1 C2 P1 C3 C6 P2 s2 Specific behavior 2 similar to behavior 1 Generic behavior: Collaborations C7 C8 C9 AOP solution: less redundancy, requires tool support Traditional solution: redundancy

3 The goal: Tangling control
Tangling cannot be eliminated, it can only be reduced and localized. The goal is to encapsulate program enhancements and minimize dependencies between them (loose coupling).

4 definition result deployment in den vorherigen Kapiteln wurde erklärt:
1. in der Informatik darum, Rechnermodelle zu bauen, die Prozessen in der reellen Welt simulieren. 2. Es gibt formale Mitteln, die es erlauben, die Modelle in eine für den Rechner verständlich en Sprache zu schreiben.t. In dieser Vorlesung erden wir das sogenannte objekt-orientierte Programmiermodel als das Mittel für die Beschreibung der Modelle benutzen. Mit anderen Worten, werden wir objekt-orientierte Rechnermodelle der reellen Welt bauen. Wir werden zuerst, die Konstrukte des objekt-orientierten Programmiermodels kennenlernen, d.h. die Bestandteile unsere Toolboxes. Als zweites werden wir kurz

5 Collaborations (AP&PC)
minimal assumptions on application structure Participant Graph P1 P3 P2 + required interfaces Behavior Definition P P1 meth 1,1 add new functionality + enhance the required provided = everything declared public ... written to the PG similar to an OO program is written to a concrete class graph meth 1,k P3 meth 3,1 ... meth 3,j

6 Deployment/Composition of Collaborations
Specified by adapters separately from collaborations Adapters specify crosscutting using regular-expressions to express sets of method names and class names and interface names code where simple method name mapping is not enough graphs and regular expression-like constructs for mapping graphs

7 Design issues What goes into collaborations and what goes into adapters? Depends on reuse of collaboration C. Consider n reuses of the same collaboration: A1(C), A2(C), … ,An(C) The goal is to put enough information into collaboration C so that in the adapters contain minimal code duplication.

8 Rough correspondences

9 Fad or Future Future! Many issues to be resolved Correctness
aspect composition of aspects conflicts between aspects Trying to unify the existing approaches: taxonomy of the design space


Herunterladen ppt "Aspect-Oriented Programming: Fad or the Future"

Ähnliche Präsentationen


Google-Anzeigen