Aspect-Oriented Software Development with Use Cases

959 views 26 slides Aug 06, 2014
Slide 1
Slide 1 of 26
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26

About This Presentation

want to learn about Aspect-Oriented Software Development with Use Cases. These ppts will help you . Still need more info or help with any assignment related to use case visit http://www.myassignmenthelp.net/uml-assignment-help.php


Slide Content

Aspect-Oriented Software
Development with Use Cases
AspectJ Reference:
Diagrams and materials based on “Aspect-Oriented
Software Development with Use Cases” by I.
Jacobson and P.-W. Ng, 2005, Addison-Wesley

More?
•http://www.early-aspects.net/

Use Cases – Basic Ideas
•Overview

Use Cases & Aspects
•So far, our aspects have been about non-
functional concerns
•Observations:
–a use case usually refers to a function that a user
does with the system; usually a set of use cases
model functional requirements (application use cases)
–use cases can also be used to model non-functional
requirements (infrastructure use cases)
–a use case is a user task or a concern
–a use case (whether application or infrastructure)
could correspond to an aspect!

Figure 3-1
(incomplete
list of
use cases)
Figure 3-2
(incomplete
list of
use case
realizations
for the
system)
Application Use Cases
:
Use case slices

From Use Cases to Aspects
Figure 1-2
Figure 2-1
1. public aspect CheckInCustomer {
2. ...
3. public void Room.assignCustomer ()
4. {
5. // code to check in customer
6. }
7. public void Reservation.consume()
8. {
9. // code to consume reservation
10. }
11. public void Payment.createBill()
12. {
13. // code to generate an initial outstanding bill
14. }
15. ...
16. }

Figure 4-3

Extension
Figure 4-4
Figure 4-5

Extension – con’t
Figure 6-1
Figure 6-3

Use Case: Handle Waiting List
Basic Flows
. . .
Extension Flows
EF1.Queue For Room
This extension flow occurs after UpdatingRoomAvailability yields No Rooms Available.
The system creates a pending reservation with a unique identifier for the selected Room type.
The system puts the pending reservation into a waiting list.
The system displays the unique identifier of the pending reservation to the customer.
The base use case terminates.
Extension Pointcuts
extension pointcut UpdatingRoomAvailability = Reserve Room.Update Room AvailabilityFigure 6-5

Inclusion
Figure 6-6
Figure 6-8

Generalization
Figure 6-9

Application Use Cases and Infrastructure Use
Cases - Example
Functional
reqs
Non-functional
reqs

Application Use Cases and Infrastructure Use
Cases – Example – con’t
Relationship between application
use cases and infrastructure use
case? “binding”
e.g., “<Perform Transaction>” binds to
“Reserve Room” &
“<Actor>” binds to “Customer”
Note: a template

Use Case Slice
•A use case slice is collects together the parts of classes and
operations (as represented via aspects), and (whole) classes, that
are specific to a use case.
•What follows?
–Example of 2 Application Use Cases and their Use Case Slice
Fig 13-3,12-3,12-7, 13-4, 13-6
(Jacobson & Ng)
–Example of an Infrastructure Use Case Slice
Fig 14-4,14-5;14-9
(Jacobson & Ng)

Representing a Use Case Slice in
“UML”

Representing Aspects in “UML”
(More
In handout-
Appendix A)

Basic interaction diagram
Elaborated
interaction
diagram
for reserving
room
Example 1: use case slice
for room reservation

Use Case Slice
For “Reserve Room”
Use Case
Elaborated
interaction
diagram
for reserving
room
Example 1: use case slice
for room reservation

Basic interaction diagram
Elaborated
interaction
diagram
for handling waiting list
Example 2: use case slice
for handle waiting list

Elaborated
interaction
diagram
for handling waiting list
Use Case Slice
For “Handle
Waiting List”
Use Case

Example: Infrastructure Use case slice for
Adding authorization checks
Basic interaction diagram
Basic interaction
Diagram extended
With authorization calls
Use case slice for “Handle Authorization”

For each use case slice,
define corresponding
classes and aspects.
Form the system by
putting together use case slices +
non-use case slices (not shown)…

Aspects and Architecture
Driving and Managing Architectural Decisions with Aspects, Garcia et al., 2006

Aspects and Architecture
Driving and Managing Architectural Decisions with Aspects, Garcia et al., 2006

Aspects and Software Product
Lines
•There are kernel, optional, variant features
in products
•“Extensions” can be modelled and
implemented via aspects – variations
localised in aspects
•On-going: e.g., http://ample.holos.pt/,
http://www.softeng.ox.ac.uk/aople/