42
Lecturer: Dr. AJ Bieszczad Chapter 5 5-1 Designing the system • Conceptual design and technical design • Design styles, techniques and tools • Characteristics of good design • Validating designs • Documenting the design

Designing the system

  • Upload
    sela

  • View
    27

  • Download
    0

Embed Size (px)

DESCRIPTION

Designing the system. Conceptual design and technical design Design styles, techniques and tools Characteristics of good design Validating designs Documenting the design. Conceptual design. Tells the customer what the system will do Answers: Where will the data come from? - PowerPoint PPT Presentation

Citation preview

Page 1: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-1

Designing the system

• Conceptual design and technical design

• Design styles, techniques and tools

• Characteristics of good design

• Validating designs

• Documenting the design

Page 2: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-2

Conceptual design• Tells the customer what the system will do

• Answers:– Where will the data come from?

– What will happen to the data in the system?

– What will the system look like to users?

– What choices will be offered to users?

– What is the timing of events?

– What will the reports and screens look like?

• Characteristics of good conceptual design– in customer language with no technical jargon

– describes system functions

– independent of implementation

– linked to requirements

Page 3: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-3

Technical design

• Tells the programmers what the system will do

• Includes:– major hardware components and their function– hierarchy and function of software components– data structures– data flow

Page 4: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-4

Conceptual and technical designs

Page 5: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-5

Difference in design documentation

Page 6: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-6

Five ways to create designs

• Modular decomposition

• Data-oriented decomposition

• Event-oriented decomposition

• Outside-in design

• Object-oriented design

Page 7: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-7

Levels of decomposition

Page 8: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-8

“Toaster model”

Page 9: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-9

Three design levels

• Architecture: associates system components with capabilities

• Code design: specifies algorithms and data structures for each component

• Executable design: lowest level of design, including memory allocation, data formats, bit patterns

Page 10: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-10

Design styles

• Pipes and filters• Object-oriented design• Implicit invocation• Layering• Repositories• Interpreters• Process control• Client-server

Page 11: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-11

Pipes and filters

Page 12: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-12

Layered security architecture

Page 13: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-13

Blackboard model

Page 14: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-14

Interpreter example

Page 15: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-15

Feedback and feed-forward systems

Page 16: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-16

Ring and star topologies for distributed systems

Page 17: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-17

Example of implicit invocation

DEBUG VALUE <syst em><fi l e><l i ne><var ><val ue>DEBUG ENTER <syst em><fi l e><f unc><l i ne><val ue>DEBUG EXI T <syst em><fi l e><f unc><l i ne><val ue>EVENT ADD <syst em><i d#><event _t ype><fi l e><l i ne><t ext >EVENT REMOVE <syst em><i d#><event _t ype><fi l e><l i ne><t ext >STOP- ERROR <si gnal ><fi l e><l i ne>DEBUG AT <syst em><fi l e><f unc><l i ne>DEBUG FOCUS <syst em><fi l e><f unc><l i ne>DEBUG CLEAR <syst em>DEBUG RESET <syst em>WHERE <syst em><l evel ><fi l e><f unc><l i ne><addr ><ar gs>WHERE_DUMP <syst em><l evel ><name><val ue>WHERE_BEGI N <syst em>WHERE_END <syst em><l evel >DEBUG SYSTEM <syst em>DEBUG NOSYSTEM <syst em>UPDATE <syst em><fi l e><l i ne>

Page 18: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-18

Important design issues

• Modularity and levels of abstraction• Collaborative design• Designing the user interface

– metaphors, mental model, navigation rules, look and feel

– cultural issues– user preferences

• Concurrency• Design patterns and reuse

Page 19: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-19

Example of abstraction

DO WHILE I is between 1 and (length of L)-1: Set LOW to index of smallest value in L(I), ..., L(length of L) Interchange L(I) and L(LOW)END DO

DO WHILE I is between 1 and (length of L)-1 Set LOW to current value of I DO WHILE J is between I+1 and (length of L)-1: IF L(LOW) is greater than L(J) THEN set LOW to current value of J ENDIF ENDDO Set TEMP to L(LOW) Set L(LOW) to L(I) Set L(I) to TEMPENDDO

Rearrange L in non-decreasing order

Page 20: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-20

Table 5.1. Issues to consider in trade-off analysis. (Lane, in Shaw and Garlan 1996)

Functional dimensions Structural dimensionsExternal event handling: No external events Process events while waiting for input External events preempt user commands

Application interface abstraction level Monolithic program Abstract device Toolkit Interaction manager with fixed data types Interaction manager with extensible data types Extensible interaction manager

User customizability High Medium Low

Abstract device variability Ideal device Parameterized device Device with variable operations Ad hoc device

User interface adaptability across devices None Local behavior changes Global behavior change Application semantics change

Notation for user interface definition Implicit in shared user interface code Implicit in application code External declarative notation External procedural notation Internal declarative notation Internal procedural notation

Computer system organization Uniprocessing Multiprocessing Distributed processing

Basis of communication Events Pure state State with hints State plus events

Basic interface class Menu selection Form filling Command language Natural language Direct manipulation

Control thread mechanisms None Standard processes Lightweight processes Non-preemptive processes Event handlers Interrupt service routines

Application portability across user interface styles High Medium Low

Page 21: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-21

Typical design space

Page 22: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-22

Characteristics of good design

• Component independence– coupling– cohesion

• Exception identification and handling

• Fault prevention and tolerance– active– passive

Page 23: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-23

Component coupling

Page 24: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-24

The range of coupling measures

Page 25: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-25

Example of content coupling

Page 26: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-26

Example of common coupling

Page 27: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-27

Types of cohesion

Page 28: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-28

Examples of cohesion

Page 29: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-29

Scope of control

Page 30: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-30

Techniques for improving design

• Reducing complexity

• Design by contract

• Prototyping design

• Fault-tree analysis

Page 31: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-31

Portion of power plant control system

Page 32: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-32

Cut-set tree generated from the fault tree

Page 33: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-33

Fault rate vs. system design complexity

Page 34: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-34

Design evaluation and validation

• Mathematical validation

• Measuring design quality

• Comparing designs– one specification, many designs– comparison table

• Design reviews

Page 35: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-35

Shared data solution for KWIC

Page 36: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-36

Abstract data type solution for KWIC

Page 37: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-37

Implicit invocation solution for KWIC

Page 38: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-38

Pipe-and-filter solution to KWIC

Page 39: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-39

Table 5.5. Weighted comparison of Shaw and Garlan designs.

Attribute Priority Shareddata

Abstract datatype

Implicitinvocation

Pipe and filter

Easy to changealgorithm

1 1 2 4 5

Easy to changedatarepresentation

4 1 5 2 1

Easy to changefunction

3 4 1 4 5

Goodperformance

3 5 4 2 2

Easy to reuse 5 1 4 2 5

Page 40: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-40

Design reviews

• Preliminary design review– examines conceptual design with customer and

users

• Critical design review– presents technical design to developers

• Program design review– programmers get feedback on their designs

before implementation

Page 41: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-41

Questions for any design reviewIs it a solution to the problem?Is it modular, well-structured, and easy to understand?Can we improve the structure and understandability?Is it portable to other platforms?Is it reusable?Is it easy to modify or expand?Does it support ease of testing?Does it maximize performance, where appropriate?Does it reuse components from other projects, where appropriate?Are the algorithms appropriate, or can they be improved?If this system is to have a phased development, are the phases interfaced sufficiently so that there is an easy transition from one phase to the next?Is it well-documented, including design choices and rationale?Does it cross-reference the components and data with the requirements?Does it use appropriate techniques for handling faults and preventing failures?

Page 42: Designing the system

Lecturer: Dr. AJ Bieszczad

Chapter 5 5-42

Documenting the design• design rationale• menus and other display-screen formats• human interfaces: function keys, touch screen descriptions, keyboard layouts, use of a mouse or joystick• report formats• input: where data come from, how they are formatted, on what media they are stored• output: where data are sent, how they are formatted, on what media they are stored• general functional characteristics• performance constraints• archival procedures• fault-handling approach