Identifying Crosscutting Themes


There are three shared requirements in the set: R1, R5, and R6. They are expanded in Figure 8-2. We now look at each requirement, applying the heuristics for deciding whether they reveal aspect behavior.

Figure 8-2. Grouped themes, shared requirements expanded.


R1 reads, The menu consists of several options: make a voice call, write an SMS, use the media player, play a game. The first thing to consider is whether the requirement can be split. Since the requirement lists the components of a menu, there is no way to rewrite it to isolate the themes from one another. The second thing to determine is whether one theme dominates the requirement. In this case, the menu theme seems to be the dominant requirement, since the requirement lists a set of things that are contained in the menu. Next, we check to see whether the other themes (such as voice call) trigger action in the dominant theme, menu. This check failsthere is no trigger relationship described in the requirement. Instead, the relationship between menu and the other themes is more of a "has-a" relationship. So, we postpone the requirement and likely design the dominant theme, menu, as a concept shared theme.

R5 reads, When alerts and rings occur, other audio (media player, voice call, game sounds) is momentarily muted, but not paused. Once again, this requirement cannot be split, but in this case, it's dominated by the behavior related to the preempt theme. This requirement also passes the trigger test: preempt (actually its subtheme mute) is triggered by alerts and rings, and since this requirement describes more than one situation in which preemption is triggered (when both alerts and rings occur), we can conclude that preempt is an aspect.

R6 reads, When a voice call occurs, other activities (media player, games, SMS edit) are paused, and their state saved, to be resumed when the call ends. Once again, this requirement cannot be split and is dominated by preemption behavior, and also triggers preemption behavior. This requirement describes an additional situation in which preemption is triggered: when a voice call occurs. Once again, preempt is an aspect.

Figure 8-3 shows the crosscutting view of the system. You can see the five concept-sharing (or base) themes and the crosscutting theme preempt.

Figure 8-3. Crosscutting view.




Aspect-Oriented Analysis and Design(c) The Theme Approach
Aspect-Oriented Analysis and Design: The Theme Approach
ISBN: 0321246748
EAN: 2147483647
Year: 2006
Pages: 109

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net