Aspect Oriented Programming Flashcards

1
Q

(MP)*** Aspect code implementing a concern

A

advice

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

**(MP)* **Occurs when the implementation of a concern is dispersed across more than one component in a program

A

scattering

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

(MP)** An abstraction designed to encapsulate functionality/code associated with a cross cutting concern

A

aspect

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

(MP)A program abstraction that defines a cross-cutting concern

A

aspect

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

**(MP)* **Functional requirements that directly relate to a system’s primary purpose

A

core concerns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

(MP)Normally organized and structured using such programming language abstractions as procedures and classes

A

core concerns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

(MP)Specific functionality that relates to a system’s primary purpose

A

core concerns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

**(MP)** **An event in an executing program where the code associated with an aspect may be executed

A

join point

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

(MP)*** Occurs when a module in a system includes code that implements different system requirements

A

tangling

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

**(MP)* **The set of events that may be referenced in a pointcut

A

join point model

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

**(MP)** **A statement, included in an aspect, that defines where code should be executed in a program

A

pointcut

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

(MP)* Requirements such as those associated with quality of service issues that apply to a system as a whole rather than those associated with the primary functional services a system provides

A

cross-cutting concerns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

(MP)Requirements reflecting attributes of the system as a whole or which influence the implementation of requirements.

A

cross-cutting concerns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

(MP)program elements reflecting (functional and non-functional) requirements that are distributed among a number of system components

A

cross-cutting concerns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

(MP)* Act of combining objects, methods, and aspects to create an executable program

A

weaving

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

The incorporation of advice at specified join points

A

weaving

17
Q

(13,12-SC) Sommerville notes that “Aspects are completely different from other program abstractions…”. Which one of the following best describes the distinguishing charac- teristic of aspects?

A

Unlike other abstractions, an aspect itself includes a specification of where it should be executed.

Other Wrong:

  • The interaction between aspects and other program abstractions is strictly asyn- chronous.
  • There is a clear separation between the definition of the abstraction and its use. (You cannot tell by examining an aspect where it will be called from.)
  • Aspect transactions are typically “brief,” whereby a cross-cutting service is called, does something, and returns a result. With other abstractions, transactions are usually “long,” e.g., editing a document.
  • Aspects may only communicate with core components via middleware using remote
18
Q

(11-QA) Identify all the “core” and “cross-cutting concerns” depicted in the diagram. Clearly annotate the diagram using the labels “core” (for core concerns) and “cross” (for cross-cutting concerns).

A
  • Core: “New customer reqmts,” “Account reqmts,” and “Customer management reqmts”
  • Cross: “Security reqmts” and “Recovery reqmts”
19
Q

(11-QA) Clearly identify, using words, a single, specific example of “tangling” that is represented in the diagram

A

Tangling would occur, for example, when the component that implements “New customer reqmts” also includes code for the two cross-cutting concerns, “Security reqmts” and “Recovery reqmts.”

20
Q

(11-QA) Clearly identify, using words, a single, specific example of “scattering” that is represented in the diagram

A

Scattering would occur, for example, when cross-cutting concern, “Security reqmts” is implemented in all three of the components implementing the core concerns

21
Q

(10-QA) Briefly explain why program inspections and white-box testing can be problematic with aspect oriented programs

A

You can’t always tell from the source code alone where an aspect will be woven and executed. Thus, “flattening” an aspect oriented program (to make it readable from right to left and top to bottom) is problematic, as is deriving a conventional control flow graph (used in white-box testing)

22
Q

Mapping AOP concept and picture

A

In most large systems, the mapping between requirements and components is not 1:1

Other Incorrect:

  • “Flattening” an aspect-oriented program for reading is problematic.
  • AOSD involves isolating potentially changeable “cross-cutting concerns” in separate program aspects.
  • The mapping between requirements and components is 1:1 in most large systems.
  • Some consider the problems of inspecting and deriving structural tests for aspect oriented programs to be a significant barrier to the adoption of AOSD.
  • An aspect-oriented program is created by automatically combining objects, methods, and aspects.
23
Q

Definition of “Information hiding”. What are aspects and what is their relationship with “information hiding”?

A
  • Potentially changeable design decisions are isolated (“hidden”) to minimize the impact of change
  • An aspect is an abstraction which encapsulates the code associated with a cross-cutting (i.e., distributed across a number of program components) concern or requirements. Thus, aspects can be used to isolate potentially changeable “cross-cutting concerns” (design decisions that cut across program components) in order to minimize the impact of change