Design: HOW to implement a system

Slides:



Advertisements
Similar presentations
Software Design Fundamentals
Advertisements

Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Structured Design. 2 Design Quality – Simplicity “There are two ways of constructing a software design: One is to make it so simple that there are obviously.
Design Concepts and Principles
1 Software Design Introduction  The chapter will address the following questions:  How do you factor a program into manageable program modules that can.
SLC/Ver1.0/OS CONCEPTS/Oct'991INTRODUCTION What is an Operating System? Operating Structure -System Components -OS Services -System Calls & Programs -System.
Design Phase What’s design?
What is Software Design?  Introduction  Software design consists of two components, modular design and packaging.  Modular design is the decomposition.
Software Design Deriving a solution which satisfies software requirements.
Introduction To System Analysis and Design
Component-Level Design
Software Architecture Design Instructor: Dr. Jerry Gao.
Lecture 23: Software Architectures
Establishing the overall structure of a software system
Design: HOW to implement a system
System Design. Design: HOW to implement a system Goals: Satisfy the requirements Satisfy the customer Reduce development costs Provide reliability Support.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Software Issues Derived from Dr. Fawcett’s Slides Phil Pratt-Szeliga Fall 2009.
Course Instructor: Aisha Azeem
Chapter 10: Architectural Design
Copyright Arshi Khan1 System Programming Instructor Arshi Khan.
Architectural Design Establishing the overall structure of a software system Objectives To introduce architectural design and to discuss its importance.
Architectural Design.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
University of Toronto at Scarborough © Kersti Wain-Bantin CSCC40 system design 1 what is systems design? preparation of the system’s specifications with.
Chapter 10 Architectural Design
The Design Discipline.
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
1 COSC 4406 Software Engineering COSC 4406 Software Engineering Haibin Zhu, Ph.D. Dept. of Computer Science and mathematics, Nipissing University, 100.
An Introduction to Software Architecture
Architectural Design portions ©Ian Sommerville 1995 Establishing the overall structure of a software system.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
SOFTWARE DESIGN (SWD) Instructor: Dr. Hany H. Ammar
SOFTWARE DESIGN.
1 Software Design Reference: Software Engineering, by Ian Sommerville, Ch. 12 & 13, 5 th edition and Ch. 10, 6 th edition.
SOFTWARE DESIGN Design Concepts Design is a meaningful engineering representation of something that is to be built It can be traced to a customer’s requirements.
RELATIONAL FAULT TOLERANT INTERFACE TO HETEROGENEOUS DISTRIBUTED DATABASES Prof. Osama Abulnaja Afraa Khalifah
1 Software Design Overview Reference: Software Engineering, by Ian Sommerville, Ch. 12 & 13.
SE: CHAPTER 7 Writing The Program
Cohesion and Coupling CS 4311
CE Operating Systems Lecture 3 Overview of OS functions and structure.
CPSC 372 John D. McGregor Module 3 Session 1 Architecture.
Processes Introduction to Operating Systems: Module 3.
John D. McGregor Class 4 – Initial decomposition
1 CMPT 275 High Level Design Phase Modularization.
SOFTWARE DESIGN. INTRODUCTION There are 3 distinct types of activities in design 1.External design 2.Architectural design 3.Detailed design Architectural.
University of Toronto at Scarborough © Kersti Wain-Bantin CSCC40 system architecture 1 after designing to meet functional requirements, design the system.
CSC480 Software Engineering Lecture 10 September 25, 2002.
Feb. 9, 2004CS WPI1 CS 509 Design of Software Systems Lecture #4 Monday, Feb. 9, 2004.
System Design. System Design After analyzing the problem, you must decide how to approach the design. During.
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
Slide 1 Chapter 8 Architectural Design. Slide 2 Topics covered l System structuring l Control models l Modular decomposition l Domain-specific architectures.
SOFTWARE DESIGN & SOFTWARE ENGINEERING Software design is a process in which data, program structure, interface and their details are represented by well.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Why is Design so Difficult? Analysis: Focuses on the application domain Design: Focuses on the solution domain –The solution domain is changing very rapidly.
7. Modular and structured design
Teaching Innovation - Entrepreneurial - Global
Chapter ? Quality Assessment
Lecture 9- Design Concepts and Principles
Part 3 Design What does design mean in different fields?
CHAPTER 2 CREATING AN ARCHITECTURAL DESIGN.
CIS 375 Bruce R. Maxim UM-Dearborn
Chapter 5 Designing the Architecture Shari L. Pfleeger Joanne M. Atlee
Object-Oriented Design
Software Architecture
Design Model Like a Pyramid Component Level Design i n t e r f a c d s
Lecture 9- Design Concepts and Principles
Software Design Lecture : 9.
An Introduction to Software Architecture
Chapter 5 Architectural Design.
Presentation transcript:

Design: HOW to implement a system Goals: Satisfy the requirements Satisfy the customer Reduce development costs Provide reliability Support maintainability Plan for future modifications

Design Issues Architecture User Interface Data Types Operations Data Representations Algorithms

Design System design (high level design) Focus on architecture Identification of subsystems Object design (lower level design) Modules and their implementations Focus on data representations and algorithms

System Design Choose high-level strategy for solving problem and building solution Decide how to organize the system into subsystems Identify concurrency / tasks Allocate subsystems to HW and SW components

System Design Major conceptual and policy decisions Approach for management of data stores Access mechanism for global resources Software control mechanism Handle boundary conditions Prioritize trade-offs

Design Principles Consider alternative approaches Do pro and con analysis Delay decisions until superior choice is clear Isolate decisions so alternative implementations can be evaluated later Avoid unnecessary embellishments But don’t oversimplify

Design Principles (cont.) Make design traceable to requirements Use uniform documentation style Reuse existing designs when possible Keep design simple unless performance, maintainability, etc. DEMAND otherwise

Design Principles (cont.) Define interfaces between modules carefully Consider how to handle the unexpected Don’t code!! Document decisions Review, review, review . . .

System Architecture Overall organization of system into subsystems Decide basic interaction patterns Numerous architectural styles for different applications Architecture provides context for detailed design decisions

Subsystem Identification Divide system into a manageable number of components Each major component is a subsystem Subsystem groups components with common properties/function

Subsystem Collection of Interrelated Good cohesion Classes Associations Operations Events Constraints Interrelated Good cohesion Well-defined, small interface with other subsystems Low coupling Identified by the service it provides

Subsystem Discussion Provide services for other sub-systems Group of related functions Share a common purpose Divide system into components (>20) Subsystems are decomposed . . . Module is the lowest level of subsystem

Subsystem Relationships Client-Server relationship Client subsystems actively drive the system by requesting services provided by a server subsystem Peer-to-peer relationship Subsystems interact and communicate to accomplish a common goal

Client-Server Relationship Server supplies services for clients Need not know identity of clients Need not know interface of clients Client calls server Client knows interface of server Server performs some service and returns a result

Peer-to-Peer Relationship Subsystems call one another The results of/responses to calls may not be immediately visible Subsystems must know the interfaces of other subsystems More likely to have communication dependencies

Strategies for Decompositions Layers: Horizontal decomposition Open Closed Partitions: Vertical decomposition System topology: General decompositions

Layered Subsystems Set of “virtual” worlds Each layer is defined in terms of the layer(s) below it Knowledge is one way: Layer knows about layer(s) below it Objects within layer can be independent Lower layer (server) supplies services for objects (clients) in upper layer(s)

Example: Layered architecture Interactive Graphics Application Windows Operations Screen Operations Pixel Operations Device I/O Operations

Closed Architectures Each layer is built only in terms of the immediate lower layer Reduces dependencies between layers Facilitates change

Open Architectures Layer can use any lower layer Reduces the need to redefine operations at each level More efficient /compact code System is less robust/harder to change

Properties of Layered Architectures Top and bottom layers specified by the problem statement Top layer is the desired system Bottom layer is defined by available resources (e.g. HW, OS, libraries) Easier to port to other HW/SW platforms

Partitioned Architectures Divide system into weakly-coupled subsystems Each provides specific services Vertical decomposition of problem

Ex: Partitioned Architecture Operating System Virtual Memory Manage- ment File System Process Control Device Control

Typical Application Architecture Application package Window graphics Screen graphics Pixel graphics Operating system Computer hardware User dialogue control Simulation package

System Topology Describe information flow Some common topologies Can use DFD to model flow Some common topologies Pipeline (batch) Star topology

Ex: Pipeline Topology Compiler: Lexical analyzer Semantic analyzer source program Lexical analyzer Semantic analyzer token stream abstract syntax tree code sequence object code Code generator Code optimizer

Ex: Star Toplogy Monitoring system: Alarm Sensors SafeHome software sensor status On/Off signals, alarm type SafeHome software commands, data Telephone line Control panel number tones display information

Modularity Organize modules according to resources/objects/data types Provide cleanly defined interfaces operations, methods, procedures, ... Hide implementation details Simplify program understanding Simplify program maintainance

Abstraction Control abstraction Procedural abstraction structured control statements exception handling concurrency constructs Procedural abstraction procedures and functions Data abstraction user defined types

Abstraction (cont.) Abstract data types Abstract objects encapsulation of data Abstract objects subtyping generalization/inheritance

Cohesion Contents of a module should be cohesive Improves maintainability Easier to understand Reduces complexity of design Supports reuse

(Weak) Types of cohesiveness Coincidentally cohesive contiguous lines of code not exceeding a maximum size Logically cohesive all output routines Temporally cohesive all initialization routines

(Better) Types of cohesiveness Procedurally cohesive routines called in sequence Communicationally cohesive work on same chunk of data Functionally cohesive work on same data abstraction at a consistent level of abstraction

Example: Poor Cohesion package Output is procedure DisplayDice( . . .); procedure DisplayBoard( . . .); Dice I/O device Output Board

Example: Good Cohesion package Dice is procedure Display ( . . .); procedure Roll( . . .); Dice I/O device Board

Coupling Connections between modules Bad coupling Global variables Flag parameters Direct manipulation of data structures by multiple classes

Coupling (cont.) Good coupling Good coupling improves maintain-ability Procedure calls Short argument lists Objects as parameters Good coupling improves maintain-ability Easier to localize errors, modify implementations of an objects, ...

Information Hiding Hide decisions likely to change Black box Data representations, algorithmic details, system dependencies Black box Input is known Output is predictable Mechanism is unknown Improves maintainability

Information Hiding

Abstract data types Modules (Classes, packages) Encapsulate data structures and their operations Good cohesion implement a single abstraction Good coupling pass abstract objects as parameters Black boxes hide data representations and algorithms

Identifying Concurrency Inherent concurrency May involve synchronization Multiple objects receive events at the same time with out interacting Example: User may issue commands through control panel at same time that the sensor is sending status information to the SafeHome system

Determining Concurrent Tasks Thread of control Path through state diagram with only one active object at any time Threads of control are implemented as tasks Interdependent objects Examine state diagram to identify objects that can be implemented in a task

Management of Data Stores Data stores permit separations between subsystems Internal or external Common types of data stores Files Databases

File Data Stores When to use a database Require access to voluminous data at fine levels of detail by multiple users Access can be efficiently managed with DBMS commands Application must port across many HW and OS platforms Store is to be accessed by multiple application programs

Database Data Stores Advantages Disadvantages Infrastructure support Common interface Standard access language (SQL) Disadvantages Performance penalty Awkward programming language

File Data Stores When to use file data stores Data does not fit structure of DBMS Voluminous data that is low in information density “Raw” data Volatile data only retained for a short time

Global Resources Identify global resources and determine access patterns Examples physical units (processors, tape drives) available space (disk, screen, buttons) logical names (object IDs, filenames) access to shared data (database, file)

Software Control Mechanism How SW will control interactions between objects Internal control flow of control within a process External control flow of externally-visible events among objects Uniform control style for objects

Internal Control Under control of programmer Structured for convenience efficiency, clarity, reliability, . . . Common types of control flow Procedure calls Quasi-concurrent inter-task calls Concurrent inter-task calls

External Control Procedure-driven systems Event-driven systems Concurrent systems

Procedure-driven systems Control resides within the program code procedure issues request, waits for reply, then continues execution System state defined by program counter, stack of procedure calls, local variables

Event-Driven Systems Control resides within a central dispatcher calls to the dispatcher send output or enable input dispatcher invokes procedures when events occur (“call back”) state maintained using global variables, or by dispatcher for procedures

Concurrent Systems Control resides concurrently in independent tasks Events are implemented as messages between tasks OS schedules tasks for execution

Boundary Conditions Initialization Termination Failure Constants, parameters, global variables, tasks, guardians, class hierarchy Termination Release external resources, notify other tasks Failure Clean up and log failure info

Identify Trade-off Priorities Establish priorities for choosing between incompatible goals Implement minimal functionality initially and embellish as appropriate Isolate decision points for later evaluation Trade efficiency for simplicity, reliability, . . .