DESIGN OF SOFTWARE ARCHITECTURE
description
Transcript of DESIGN OF SOFTWARE ARCHITECTURE
![Page 1: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/1.jpg)
DESIGN OFSOFTWARE ARCHITECTURE
Instructor: Dr. Hany H. AmmarDept. of Computer Science and Electrical Engineering, WVU
![Page 2: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/2.jpg)
Ouline
UML Development – Overview The Requirements, Analysis, and Design Models What is Software Architecture?
– Software Architecture Elements Software Architecture Styles A Simple Example of Software Architecture Design of Software Architecture Examples
![Page 3: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/3.jpg)
UML Development - Overview
PROGRAM
ACTORS
ANALYSISSpecify Domain Objects
Detailed DESIGN
IMPLEMENTATION
DATA
DICTIONARY
TimeUSE CASES
ANALYSISCLASS DIAGRAM(S)
IMPLEMENTATIONActivity DIAGRAMS
SEQUENCEDIAGRAMS
OPERATION CONTRACTS
StateChart DIAGRAMs
DEPLOYMENT DIAGRAMSUBSYSTEM CLASS/OR COMPONENT
DIAGRAMS
Architectural DesignIncludeDesign Objects
ObjectDesign
SCENARIOS
REQUIREMENTSELICITATION
DESIGN DIAGRAMS
IMPLEMENTATIONCHOICES
DESIGN SEQUENCE DIAG.
![Page 4: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/4.jpg)
The Requirements, Analysis, and Design Models
Static Analysis Dynamic Analysis
Functional/ NonfunctionalRequirements
Use Case Diagrams/Sequence Diagrams(the system level)
- Analysis Class Diagrams- State Diagrams/Refined Sequence Diagrams (The object level)
Requirements ElicitationProcess
The AnalysisProcess
Static ArchitecturalDesign
Dynamic Design
The DesignProcess
• Design Class Diagrams andComponents Diagrams• Design Sequence Diagrams
![Page 5: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/5.jpg)
Ouline
UML Development – Overview The Requirements, Analysis, and Design Models What is Software Architecture?
– Software Architecture Elements Software Architecture Styles A Simple Example of Software Architecture Design of Software Architecture Examples
![Page 6: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/6.jpg)
What is Software Architecture?
A simplified DefinitionA software architecture is defined by a configuration of architectural elements--components, connectors, and data--constrained in their relationships in order to achieve a desired set of architectural properties.
![Page 7: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/7.jpg)
Software Architecture Elements
A component is an abstract unit of software instructions and internal state that provides a transformation of data via its interface
A connector is an abstract mechanism that mediates communication, coordination, or cooperation among components.
![Page 8: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/8.jpg)
Software Architecture Elements A datum is an element of information that is transferred
from a component, or received by a component, via a connector.
A configuration is the structure of architectural relationships among components, connectors, and data during a period of system run-time.
An architectural style is a coordinated set of architectural constraints that restricts the roles/features of architectural elements and the allowed relationships among those elements within any architecture that conforms to that style.
Detailed example: http://sunset.usc.edu/SSCS/toc.htmlStandard Satellite Control Segment
Reference Architecture
![Page 9: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/9.jpg)
Ouline
UML Development – Overview The Requirements, Analysis, and Design Models What is Software Architecture?
– Software Architecture Elements Software Architecture Styles A Simple Example of Software Architecture Design of Software Architecture Examples
![Page 10: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/10.jpg)
Software Architectures Course Overview 10
Software Architectural Styles An architectural style is a class of architectures
characterized by:– Components types: are component classes characterized by either SW
packaging properties or functional or computational roles within an application.
– Communication patterns between the components: the communication protocols between the component types.
– Semantic constraints, indicating the behavioral properties of the components individually, and in the context of their interactions.
– A set of connectors, SW artifacts that enable us to implement the communication between the components in a way that satisfies the semantic constraints.
![Page 11: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/11.jpg)
Example of an Architecture Style Embedded Systems example architecture
MonitorsMonitor sensors
<<Interface>>Input_devices
or actorsControllers
Generate controls
<<Interface>>Output_devices
or actors
SchedulersSchedule controllers
![Page 12: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/12.jpg)
Example of an Architecture Style
The Layered Architecturee.g computer networkServices architecture
Application Layer
Presentation Layer
Session Layer
![Page 13: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/13.jpg)
Layered Architectural stylesExample of a Layered Application Architecture
![Page 14: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/14.jpg)
Example of an Architecture Style: The Layered Architecture Interactive Electronic Technical Manuals (IETMs) for
Technicians to use for repairing complex systems
Data Access
IETM Electronic Display System (EDS)
IETM Data User Interface
Business Services User ServicesData Services
![Page 15: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/15.jpg)
Ouline
UML Development – Overview The Requirements, Analysis, and Design Models What is Software Architecture?
– Software Architecture Elements Software Architecture Styles A Simple Example of Software Architecture Design of Software Architecture Examples
![Page 16: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/16.jpg)
Information Available At Architectural Design The Requirements model
– Use cases, Use case Diagram, system sequence diagrams
The Analysis model– Analysis class diagram, – stateCharts for multi-modal classes, and – Domain Object sequence diagrams
![Page 17: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/17.jpg)
Artifacts Developed at Architectural Design Subsystems + their public interfaces
(APIs) Subsystem dependencies Subsystems class diagrams. A class
diagram for each subsystem
Architecture designRequirementsAndAnalysis models
DesignClassDiagrams
![Page 18: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/18.jpg)
The Process of Designing Software Architectures
Software Architecture 1. Define overall structure of the system into
components or subsystems, or classes2. Define Component interfaces and interconnections
separately from component internals (defined during details design)
Each subsystem performs major service – Contains highly coupled objects– Relatively independent of other subsystems – May be decomposed further into smaller subsystems– Subsystem can be an aggregate or a composite object
![Page 19: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/19.jpg)
Step 1 - Subsystem/Components Structuring Criteria
Decompose the system into subsystems or classes such that each performs a specific function or task to maximize cohesion and minimize coupling, the following are typical examples of subsystems or classes
Controllers – Subsystem controls a given aspect of the system (e.g., Cruise cont. Fig. 20.45)
Coordinators/Schedulers – Coordinates several control subsystems (e.g., Cruise cont Fig 20.45,20.46)
Data Collectors/Monitors – Collects data from external environment (e.g., Cruise cont Fig. 20.45)•
Data analyzersProvides reports and/or displays (e.g., Cruise cont Fig. 20.26)
Servers– Provides service for client subsystems (e.g., MyTrip example)
User/Device Interface– Collection of objects supporting needs of user (e.g., Cruise cont Fig. 20.26)
![Page 20: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/20.jpg)
Another way of forming subsystems
Aggregate into the same subsystem– Objects that participate in the same use case
(functional cohesion)– Objects that have a large volume of interactions
(e,g, Control object & objects it controls) or share common data or file structures (communicational cohesion)
– Object that execute in the same time (temporal cohesion)
![Page 21: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/21.jpg)
Example: MyTrip System, uses a Global Positioning System to locate and coordinate a trip for a driver in an automobile software system
The Analysis Class Diagram
Location
Segment
Crossing
Direction
Destination
TripRouteAssistant PlanningService
![Page 22: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/22.jpg)
Design Class DiagramMyTrip Subsystems
Location
Segment
Crossing
Direction
Destination
RoutingSubsystem PlanningSubsystem
TripRouteAssistant PlanningService
![Page 23: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/23.jpg)
MyTrip Deployment Diagram
:RoutingSubsystem :PlanningSubsystem
:OnBoardComputer :WebServer
Components must be associated with a processor node in the deployment diagram
![Page 24: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/24.jpg)
New Classes and Subsystems
TripLocation
PlanningService
SegmentCrossing
RouteAssistant
Direction
Destination
TripProxy
SegmentProxy
PlanningSubsystem
Message
Connection
CommunicationSubsystem
RoutingSubsystem
![Page 25: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/25.jpg)
MyTrip Data Storage
PlanningSubsystem
MapDBStoreSubsystemTripFileStoreSubsystem
RoutingSubsystem
CommunicationSubsystem
![Page 26: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/26.jpg)
Example: Cruise Control And Monitoring System Class Diagram of the
Cruise Control Subsystem
![Page 27: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/27.jpg)
Example: Cruise Control System;The Monitoring Subsystem
![Page 28: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/28.jpg)
Example: Aggregating classes into a subsystem using temporal cohesion
![Page 29: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/29.jpg)
Example: aggregating classesUsing functional cohesion
![Page 30: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/30.jpg)
Step 2 - Define Subsystem Interfaces
The set of public operations forms the subsystem interface or Application Programming Interface (API)
Includes operations and also their parameters, types, and return values
Operation contracts are also defined (pre- and post-conditions) and accounted for by client subsystems – they can be considered part of the API
![Page 31: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/31.jpg)
Subsystem Interfaces
FeedforwardStrategy(from POAD1-Feedback)
<<Strategy>> FeedbackObserver<<Observer>>
(from POAD1-Feedback)
FeedbackStrategy<<Strategy>>
(from POAD1-Feedback)ErrorObserver<<Observer>>
(from POAD1-Feedback)
Blackboard<<Blackboard>>
(from POAD1-Feedback)
Context
Update Notify Context
Update
Notify
setData getData
Interfaces can be methods such as Notify, update, Or can be classes such context.
![Page 32: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/32.jpg)
Ouline
UML Development – Overview The Requirements, Analysis, and Design Models What is Software Architecture?
– Software Architecture Elements Software Architecture Styles Design of Software Architecture Examples
![Page 33: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/33.jpg)
A Simple Example of Software Architecture
EXAMPLE: SATELLITE CONTROL SYSTEM
![Page 34: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/34.jpg)
A Simple Example of Software Architecture Using UML2
SATELLITE CONTROL SYSTEM Architecture
![Page 35: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/35.jpg)
A Simple Example of Software Architecture Using UML2
SATELLITE CONTROL SYSTEM Architecture
![Page 36: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/36.jpg)
A Simple Example of Software Architecture
SATELLITE CONTROL SYSTEM Architectural behavior
Interactions between components of the architecture for a given scanrio
![Page 37: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/37.jpg)
A complete Example: A Digital Sound RecorderFrom Requirements-to-Analysis-to-Design The main function of the DSR is to record and
playback speech. The messages are recorded using a built-in
microphone and they are stored in a digital memory.
The DSR contains an alarm clock with a calendar. The user can set a daily alarm. The alarm beeps until the user presses a key, or after 60 seconds.
![Page 38: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/38.jpg)
Digital Sound Recorder:A Complete ExampleFrom Requirements-to-Analysis-to-Design
![Page 39: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/39.jpg)
Digital Sound Recorder:A Complete Example
![Page 40: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/40.jpg)
Digital Sound Recorder:A Complete Example
SystemSequenceDiagram
![Page 41: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/41.jpg)
Digital Sound Recorder:A Complete Example
![Page 42: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/42.jpg)
Digital Sound Recorder:A Complete Example
![Page 43: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/43.jpg)
Digital Sound Recorder:A Complete Example
AnalysisClass Diagram
![Page 44: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/44.jpg)
Digital Sound Recorder:A Complete Example
DesignClass Diagram:DesigningThe Subsystems,
The names ofsubsystemsShould beimproved
![Page 45: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/45.jpg)
Digital Sound Recorder:A Complete Example
OperationDetailsAre defined UsingDesign Sequence diagrams
![Page 46: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/46.jpg)
Digital Sound Recorder:A Complete Example
![Page 47: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/47.jpg)
Digital Sound Recorder:A Complete Example
![Page 48: DESIGN OF SOFTWARE ARCHITECTURE](https://reader035.fdocuments.us/reader035/viewer/2022081520/56815e7d550346895dcd0584/html5/thumbnails/48.jpg)
Digital Sound Recorder:A Complete Example