discussion of stiemann's essay - ucf department of eecsleavens/modular-aop/discussion.pdf ·...

Post on 06-Oct-2020

0 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Discussion of Steimann’s Essay:“The Paradoxical Success of

Aspect-Oriented Programming”Gary T. Leavens

Department Of Computer Science, Iowa State University

OOPSLA, October 26, 2006

Supported in part by the US NSF

October 25, 2006 Discussion2

Outline

SummaryImportant pointsPerspective: what questions?Questionable pointsConclusion

October 25, 2006 Discussion3

Summary: Definition and Paradox

Need definition of AOP languagesDefinition offered ≈ implicit invocationParadox:

Ok in moderation, but then no contributionHurts modularity if more developed

October 25, 2006 Discussion4

Summary:Modularity of AOP

Information hiding (Parnas)“Main concern” (5.1.2):

Strong coupling of aspects to baseImplicit interface, often not publicImpairs independent development

Explicit interfaces for aspects in base: Less obliviousnessMore scattering

October 25, 2006 Discussion5

Summary:Locality of AOP

Implicit invocation= less direct control flowContext exposure= more global access to variables

October 25, 2006 Discussion6

Summary:Utility of AOP

Generated code weavingForming new components (glue code)

Dismantle componentsReassemble to form new components

Observed uses:LoggingSecurityRuntime assertion checking

October 25, 2006 Discussion7

Summary:Prospects for AOP

“Tremendous success”CachetOOP is old, need something new

Paradox (section 8):Aims to “modularize crosscutting concerns”“Its very nature … breaks modularity”

October 25, 2006 Discussion8

Important Points:What is AOP?

Focus on mechanisms (vs. goals)Need definition of AOP languages

MechanismsIndependent of goals

Implicit invocation definition sensible

October 25, 2006 Discussion9

Important Points:Modularity of AOP

Interfaces are crucialExplicit interfaces for aspects in base:

Less obliviousnessMore scattering

October 25, 2006 Discussion10

Important Points:Utility of AOP

AOP especially useful as notedGenerated code weaving

Aids modularity of generatorAspectJ = Assembly language of 2000’s

Glue code is important

October 25, 2006 Discussion11

Important Points:Prospects for AOP

AOP has been a success

October 25, 2006 Discussion12

Perspective

Flon’s axiom (SIGPLAN, Oct. 1975):“There does not now, nor will there ever, exist a programming languagein which it is the least bit hard to write bad programs.“

October 25, 2006 Discussion13

Perspective

Flon’s axiom (SIGPLAN, Oct. 1975):Can write bad programs in any language

October 25, 2006 Discussion14

Perspective:What are the right questions?

Flon’s axiom (SIGPLAN, Oct. 1975):Can write bad programs in AOP languages

Can we write good ones?Without scattering and tangling ofcrosscutting concernsWithout excess coupling of aspects to base

October 25, 2006 Discussion15

Perspective:All or Nothing?

ModularitySystem is modular or not

ObliviousnessMechanisms are oblivious or not

October 25, 2006 Discussion16

Perspective:Questions of Degree

Coupling

ScatteringTangling

October 25, 2006 Discussion17

Perspective:Perfect AOP Measures

Coupling

ScatteringTangling

October 25, 2006 Discussion18

Perspective:Without AOP

Coupling

ScatteringTangling

October 25, 2006 Discussion19

Perspective:Compromise

Coupling

ScatteringTangling

October 25, 2006 Discussion20

Perspective:N-Dimensions of Modularity

Coupling

ScatteringTangling

Reasoning Difficulty

Heap interference...

October 25, 2006 Discussion21

Questionable Points:Coupling of Aspects and Base

Section 5.1.2:Code “moved out of its context …”“it must take (a reference to) the context that it depends on with it,”“thereby establishing coupling”

How often?How much coupling?

October 25, 2006 Discussion22

Questionable Points:Reducing Coupling

XPIs (Griswold et al.)Adding interfaces for crosscuttingExtra indirection reduces coupling

Open Modules (Aldrich)Explicit interface to adviceReduces obliviousness

October 25, 2006 Discussion23

Questionable Points:Paradox

Due to all-or-nothing usage of:ModularityQuantification and obliviousnessAOP’s contribution

Due to multiple senses of “modularity”Information hiding (lack of coupling)Encapsulation (lack of scattering)

October 25, 2006 Discussion24

Questionable Points:Lack of Imagination

“I find it difficult to imagine …” (4.2)“I cannot see how ... ” (4.3)“it may be my lack of imagination” (5.1.7)

October 25, 2006 Discussion25

Questionable Points:Lack of Imagination

Most technology nay-sayers wrongSome promising directions

Tool support (Eclipse AJDT)XPIsOpen ModulesStatic analysisModel-driven architectureAnnotations

October 25, 2006 Discussion26

Conclusions

Thought-provokingRead it!Agree: AOP ≈ implicit invocationPerspective on “paradox”:

N-dimensions of modularityEach a scale, not all-or-nothingCompromise!Research: how to do better

October 25, 2006 Discussion27

Time for Discussion

Coupling

ScatteringTangling

Reasoning Difficulty

Heap interference...

top related