Presentation is loading. Please wait.

Presentation is loading. Please wait.

Aspect-Oriented Software Development (AOSD) Tutorial #8 Composition Filters.

Similar presentations


Presentation on theme: "Aspect-Oriented Software Development (AOSD) Tutorial #8 Composition Filters."— Presentation transcript:

1 Aspect-Oriented Software Development (AOSD) Tutorial #8 Composition Filters

2 Aspect-Oriented Software Development (236608) 2 Today: Composition Filters Filter types Superimposition of filters Examples

3 Aspect-Oriented Software Development (236608) 3 Example: Social Security System Document flow: Creates client’s entry (claim document) in the system Forwards the request to the appropriate handler Evaluates client’s disablement Issues bank orders Communicates with clients

4 Aspect-Oriented Software Development (236608) 4 Social Security System – contd. Main classes in the system: Document – implemented by Claim Document Task Processor – implemented by all the handlers Document //fields //methods ClaimDocument //more fields //more methods

5 Aspect-Oriented Software Development (236608) 5 Social Security System – contd. TaskProcessor is implemented by all the handlers Overridden methods: processDocument, forwardDocument

6 Aspect-Oriented Software Development (236608) 6 Implement System Evolution by Composition Filters Task1: Adding documents protection. In the initial system, any clerk could edit any field in a document. We need to ensure the fields each clerk is able to edit are exactly the fields needed for his task. Solution: add message filters!

7 Aspect-Oriented Software Development (236608) 7 Documents Protection - Restrictions Part of the restrictions are as follows: “Payment” can invoke the functions (= treat the messages): putApprovedClaim approvedClaim(): Currency “MedicalCheck” can invoke the functions: putMedicalCheckData(medCData: DocumentData) medicalCheckData(): DocumentData The restrictions for the other modules are defined similarly.

8 Aspect-Oriented Software Development (236608) 8 Documents Protection Task

9 Aspect-Oriented Software Development (236608) 9 Documents Protection Task –contd. The “Implementation” part:

10 Aspect-Oriented Software Development (236608) 10 Documents Protection – Input Filters Which filter types do we need? –Error? –Substitution? –Send? –Dispatch? –Wait? –Meta?

11 Aspect-Oriented Software Development (236608) 11 Documents Protection – Input Filters

12 Aspect-Oriented Software Development (236608) 12 Documents Protection – contd. Order of the input filters = ? Output filters = ?

13 Aspect-Oriented Software Development (236608) 13 Superimposition Without superimposition: Each filter applies to one object only => Behavior crosscutting a number of methods within one object Superimposition: One filter applies to many objects Enables abstraction and (possibly multiple) instantiation

14 Aspect-Oriented Software Development (236608) 14 Superimposition – contd. abstraction instantitation filterinterfaces can be superimposed on this concern and on other concerns

15 Aspect-Oriented Software Development (236608) 15 Superimposition Syntax superimposition begin selectors Set1 = {…} Set2 = {…} … filterinterfaces Set1 <- concern1::filterinterface1; Set2 <- concern2::filterinterface2; … concern4::Set4 <- concern3::filterinterface3; end superimposition; For each superimposed filterinterface, define the set of its join-points join point selectors (abstract), define sets of concerns name of concern in which it is defined (if in the current concern, then “self” or empty) objects, methods and conditions can be superimposed in the same way

16 Aspect-Oriented Software Development (236608) 16 Task2: Adding Logging Assume a workflow control has been added the system The goal: monitor the process, detect the bottlenecks and reschedule and/or reallocate the resources, if necessary Implementation: register all the interactions among objects

17 Aspect-Oriented Software Development (236608) 17 Adding Logging – Implementation Add the class Logger. Main functionality: loggingEnabled – activate the logging loggingDisabled – deactivate the logging log(message) – extract the necessary info Additional functionality – retrieve information from the log

18 Aspect-Oriented Software Development (236608) 18 Logging – Implementation (contd.)


Download ppt "Aspect-Oriented Software Development (AOSD) Tutorial #8 Composition Filters."

Similar presentations


Ads by Google