Upload
damon-barnett
View
217
Download
3
Embed Size (px)
Citation preview
AOP issues
Class/Aspect Table
A1 A2 A3 A4 A5
C1
C2
C3
C4
C5
Loose Coupling Classes/Aspects
• When we evolve a class, how many aspects do we have to change?
• When we evolve an aspect, how many classes are affected? Ideally none. Classes oblivious of aspects.
Techniques for loose coupling of aspects/classes
• AP: structure-shy programming
• AC: put crosscutting into adapters
• Doug: BOP: each method encapsulates the condition when it is applicable. More kinds of cond. lead to better separation of concerns
• parameterize: decouple aspects from classes
variables in pointcut designators
• more efficient: can generate faster code
• pointcuts separated from advice. Abstract pointcuts.– x from first arg, x from second arg. Extra layer
of abstraction– virtual class = type defined by predicate.
Exported variables become virtual fields
other reasons for differential programming than evolution
• behavior variation
– kind specific: oo
– context-dependent
• state dependent: predicate over arguments
• perspective dependent: person takes different roles; overlapping predicates; predicate dispatch; multi-way association
• application dependent:depends on calling context; jumping aspect; only trace from caller x. Generic usage pattern; open implementation example: too many windows. previous decision point
• environment dependent:network bandwidth changes dynamically; network-aware application; QuO; access to global system functions inside predicates. Variation of state.
Service Business
• does doug have introductions?
• enabler bundles: Party, Address, Addressing, ProductOffering, BusinessInstance
• consolidation bundle: assigns values to fields of ProductOffering objects, BusinessInstance
Service Business
• delivery bundle
Design: Service Business
• enabler bundles:
– PartyB: Party and LabeledPartyGraph
– AddressB: Address, Addressing
– ProductB: ProductOffering
– EventB: EnablerEvent
– EligibilityB:
• consolidation bundle:
– AgreementB: Agreement
• delivery bundles:
Design: Service Business
• delivery bundles:– EventB: DeliveryEvent, EventTracking– AccountB: FeeComp, InterestComp, Position– AvailabilityB: Availability– RiskB: uses Availability