SWE 316: Software Design and Architecture – Dr. Khalid Aljasser Objectives Lecture 7 Requirements and Domain Classes SWE 316: Software Design and Architecture Understand distinctions: OO analysis vs. design Traditional application development vs. OO analysis & design Domain vs. non-domain classes Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission. Ch 13
SWE 316: Software Design and Architecture. Lecture 7 Requirements and Domain Classes. Ch 13. Understand distinctions: OO analysis vs. design Traditional application development vs. OO analysis & design Domain vs. non-domain classes. - PowerPoint PPT Presentation
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser
Obj
ectiv
es
Lecture 7Requirements and Domain Classes
SWE 316: Software Design and Architecture
Understand distinctions: OO analysis vs. design Traditional application development
vs. OO analysis & design Domain vs. non-domain classes
Adapted from Software Design: From Programming to Architecture by Eric J. Braude (Wiley 2003), with permission.
Ch 13
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser
Process Phases Discussed in This ChapterRequirements
AnalysisDesign
Implementation
ArchitectureFramework Detailed Design
xKey: = secondary emphasisx = main emphasis
OO Analysis and Design
Obtaining Domain Classes 1- Use Cases 2- Sequence
Diagrams 3- Harvesting 2/22
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser
Relation of software architecture to other development tasks
Applied Software Architecture by C. Hofmeister et al. 2000
OO Analysis and Design
Obtaining Domain Classes 1- Use Cases 2- Sequence
Diagrams 3- Harvesting 3/22
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser
Characteristics of OO Analysis & Design Approach is initially through the application’s
domain classes (its “ingredients”) -- rather than its required functionality Like starting a recipe by listing the ingredients Typically obtain from introducing use cases
then transforming these into sequence diagrams
Introduces domain classes at requirements time
Remaining classes at design time
Supports iterative development processes
OO Analysis and Design
Obtaining Domain Classes 1- Use Cases 2- Sequence
Diagrams 3- Harvesting 5/22
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser
The basic OOA&D approach
Emphasis is on objects (state and behavior) [ingredients]
What is the application about? Individual words (nouns) that answer the question
are the domain classes
13.1.1
OO Analysis and Design
Obtaining Domain Classes 1- Use Cases 2- Sequence
Diagrams 3- Harvesting 6/22
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser
The Basic OOA&D Approach
1. State the main use cases
2. Convert the use cases to sequence diagrams
3. Select the resulting (“domain”) classes
refine
select
OO Analysis and Design
Obtaining Domain Classes 1- Use Cases 2- Sequence
Diagrams 3- Harvesting 7/22
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser
Jacobson et al. list of the differences between OO analysis and designAnalysis Design1. Conceptual & abstract 1. Concrete: implementation
blueprint2. Applicable to several designs
2. Specific for an implementation
3. «control», «entity» & «boundary» stereotypes
3. No limit on class stereotypes
4. Less formal 4. More formal5. Less expensive to develop 5. More expensive to develop
( 5×)6. Outlines the design 6. Manifests the design 7. Emerges from conceptual thinking
7. May use tools (e.g. visual, round-trip engineering)
8. Few layers 8. Several layers9. Relatively unconstrained 9. Constrained by the
analysis & architecture
OO Analysis and Design
Obtaining Domain Classes 1- Use Cases 2- Sequence
Diagrams 3- Harvesting 8/22
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser
Seek domain classes from other sources Gather domain classes
Develop use cases with customer
Convert use cases to sequence diagrams
Introduce design patternsor components
Finalize design(class model, use case model, ….)
I. Requirements analysis phase
II. Architecture phase
III. Detailed Design phase
Determine architectureConsider Framework
(existing, modified, or new)
OOA&D Roadmap (to be explained)
OO Analysis and Design
Obtaining Domain Classes 1- Use Cases 2- Sequence
Diagrams 3- Harvesting 9/22
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser
Case Study: Encounter (1/2)Summary Specification:
Role-playing game which simulates all or part of the lifetime of the player's character.
Game characters not under the player’s control called "foreign" characters.
Game characters have a number of qualities such as strength, speed, patience etc.
Each quality has a value Characters engage each other when in the same
area.
OO Analysis and Design
Obtaining Domain Classes 1- Use Cases 2- Sequence
Diagrams 3- Harvesting 10/22
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser
Case Study: Encounter (2/2)Summary Specification:
The result of an engagement depends on the area in which it takes place, and on the values of the characters’ relevant qualities
Players may reallocate the values of their qualities when the foreign character is absent
Reallocation takes effect after a delay Success is measured by life points accumulated,
by living as long as possible etc.
OO Analysis and Design
Obtaining Domain Classes 1- Use Cases 2- Sequence
Diagrams 3- Harvesting 11/22
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser
Encounter Area Configuration
Dressingroom
Courtyard
Dungeon Study
Key: = connection
Livingroom
Kitchen
Foreign Character Freddie’s
Image
OO Analysis and Design
Obtaining Domain Classes 1- Use Cases 2- Sequence
Diagrams 3- Harvesting 12/22
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser
Obtaining Domain Classes
13.3.1 - Use Case Requirements Description
13.3.2 - Converting Use Cases to Sequence Diagrams
13.3.3 - Harvesting Domain Classes from Sequence Diagrams
13.3
OO Analysis and Design
Obtaining Domain Classes 1- Use Cases 2- Sequence
Diagrams 3- Harvesting 13/22
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser
OOA&D Roadmap: Parts Discussed in This Section
OO Analysis and Design
Obtaining Domain Classes 1- Use Cases 2- Sequence
Diagrams 3- Harvesting 14/22
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser
Use Case Requirements Description
Engageforeign
character
player
Set rules
actors
Travel toadjacent area
Initialize
1. Application displays player’s main character in the dressing room.2. Application displays a window for setting his character's qualities. 3. Player allocates the qualities of his main character. 4. Player chooses an exit from the dressing room.
Initialize
Use case titles
Use case detail
Designer
“Initialize” Use Case for Encounter Case Study13.3.1
OO Analysis and Design
Obtaining Domain Classes
1- Use Cases
2- Sequence Diagrams 3- Harvesting 15/22
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser
Travel To Adjacent Area Use Case
Initialize
Encounter
Travel toadjacent area
Set rules
Travel to Adjacent Area1. Player hits hyperlink connecting displayed area to adjacent area.2. Application displays the indicated adjacent area, including the player’s character.
Engageforeign
character
Designer
player
OO Analysis and Design
Obtaining Domain Classes
1- Use Cases
2- Sequence Diagrams 3- Harvesting 16/22
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser
Converting:Use Cases to Sequence Diagrams 13.3.2
Player
:Encounter-Game
main playercharacter:
Player Character
1*.1 create and display
5. move
Sequence Diagram for Initialize Use Case
* Numbering keyed to use case
1.2 create and display
2. create and display
3.2 set quality values
:Player qualitywindow
dressing room: Area
4. select exit for character
3.1 set quality values
OO Analysis and Design
Obtaining Domain Classes 1- Use Cases 2- Sequence
Diagrams 3- Harvesting 17/22
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser
User:Connection
Hyperlink
1.1 hit
1.2 display other area
:AreaConnection
:Area
2.1 display
2.2 display
:PlayerCharacter
Sequence Diagram for Travel to Adjacent Area Use CaseOO Analysis and
DesignObtaining Domain
Classes 1- Use Cases 2- Sequence Diagrams 3- Harvesting 18/22
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser
Harvesting Domain Classes from Sequence Diagrams13.3.
3
OO Analysis and Design
Obtaining Domain Classes 1- Use Cases 2- Sequence
Diagrams3-
Harvesting19/22
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser
Classes in Initialize Sequence DiagramEncounterGame
- a class with a single object PlayerCharacter
- with object mainPlayerCharacter
Area - with object dressingRoom, and
PlayerQualityWindow- a GUI class included to complete the use case.
OO Analysis and Design
Obtaining Domain Classes 1- Use Cases 2- Sequence
Diagrams3-
Harvesting20/22
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser
Harvesting Classes From the Sequence Diagrams
Area
Player ForeignCharacter
EncounterCharacter
GameCharacterEngagement
EncounterAreaConnection
EngagementDisplay
ConnectionHyperlink
OO Analysis and Design
Obtaining Domain Classes 1- Use Cases 2- Sequence
Diagrams3-
Harvesting21/22
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser
Summary of This Chapter OO Analysis = Requirements analysis + Domain
class selection Product = Complete requirements document + Domain
class model + Basic sequence diagrams OO Design = All other activities except coding
Product = Complete detailed design ready for coding Traditional application development: Function-