Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page:

Slides:



Advertisements
Similar presentations
Software Design Deriving a solution which satisfies software Speficitaion.
Advertisements

Software Engineering Software Design Slide 1 Software Engineering Software Design.
Software Design Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn.
Software Design Deriving a solution which satisfies software requirements.
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
7M701 1 Software Engineering Object-oriented Design Sommerville, Ian (2001) Software Engineering, 6 th edition: Chapter 12 )
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
SWE Introduction to Software Engineering
Establishing the overall structure of a software system
Introduction to Databases Transparencies
Architectural Design, Distributed Systems Architectures
Course Instructor: Aisha Azeem
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
Chapter 6: Architectural Design
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
MADALINA CROITORU Software Engineering week 4 Madalina Croitoru IUT Montpellier.
Chapter 7: Architecture Design Omar Meqdadi SE 273 Lecture 7 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
1/19 Component Design On-demand Learning Series Software Engineering of Web Application - Principles of Good Component Design Hunan University, Software.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
CS451 Lecture 13: Architectural Design Chapter 10
Chap 8. Architectural Design
Architectural Design. Recap Introduction to design Design models Characteristics of good design Design Concepts.
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 13Slide 1 Architectural Design u Establishing the overall structure of a software system.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Chapter 10 Architectural Design.
Architectural Design portions ©Ian Sommerville 1995 Establishing the overall structure of a software system.
Architectural Design To explain the advantages and disadvantages of different distributed systems architectures To discuss client-server and distributed.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
SOFTWARE DESIGN.
Sommerville, Mejia-Alvarez, 2009Software Engineering, Slide 1 Software Design u Deriving a solution which satisfies software requirements.
Software Design Deriving a solution which satisfies software requirements.
Architectural Design lecture 10. Topics covered Architectural design decisions System organisation Control styles Reference architectures.
Software Design Process A solution to satisfy the requirements ◦ Design process and methods ◦ Design strategies including object-oriented design and functional.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
Architectural Design 10/24/2015ICS 413 – Software Engineering1.
Architectural Design Yonsei University 2 nd Semester, 2014 Sanghyun Park.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
CS.436 Software Engineering By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 8 Architectural Design Slide 1 1 Chapter 8 Architectural Design.
 Repository Model  Client-Server Model  Layered Model  Modular decomposition styles  Object Models  Function Oriented Pipelining  Control Styles.
Computing and SE II Chapter 9: Design Methods and Design Models Er-Yu Ding Software Institute, NJU.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
Chapter 6 – Architectural Design Lecture 1 1Chapter 6 Architectural design.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 11 Slide 1 Architectural Design.
Chapter 7: Architectural Design Chapter 11 in textbook 1.
CSC480 Software Engineering Lecture 10 September 25, 2002.
PRINCIPLES OF GOOD DESIGN 12/7/ Assignment 4 – Deadline 28 Nov.  Read an article placed in generalshare course folder  Point: Design Patterns.
©Ian Sommerville, Robin Abraham 2004CS 361, Summer 2004 Slide 1 Architectural Design.
©Ian Sommerville 1995 Software DesignSlide 1 Software Design u Deriving a solution which satisfies software requirements.
Slide 1 Chapter 8 Architectural Design. Slide 2 Topics covered l System structuring l Control models l Modular decomposition l Domain-specific architectures.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
BZUPAGES.COMSoftware Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 11 Slide 1 Architectural Design.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Chapter 5:Architectural Design l Establishing the overall structure of a software.
CompSci 280 S Introduction to Software Development
IS301 – Software Engineering Dept of Computer Information Systems
which satisfies software requirements
Software Engineering Architectural Design Chapter 6 Dr.Doaa Sami
Part 3 Design What does design mean in different fields?
Architectural Design.
Chapter 5 Architectural Design.
Chapter 5 Architectural Design.
Chapter 6 – Architectural Design
Software Engineering Software Design.
Presentation transcript:

Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture 13 – Design Methodology 1 COMP201 - Software Engineering

Software Design Deriving a solution which satisfies software requirements 2 COMP201 - Software Engineering

Software Design Why Software is produced by many people Software needs to be Simple Understandable Flexible Portable Re-usable How Complex to simple Abstraction COMP201 - Software Engineering 3

Software Design in Reality Design mixed with implementation Design step 1 Implement and add more design Design step 2 Implement and add more design In effect much of software is designed while coded and the design document doesn’t reflect the final product COMP201 - Software Engineering 4

Stages of Design Problem understanding Look at the problem from different angles to discover the design requirements. Identify one or more solutions Evaluate possible solutions and choose the most appropriate depending on the designer's experience and available resources. Describe solution abstractions Use graphical, formal or other descriptive notations to describe the components of the design. Repeat process for each identified abstraction until the design is expressed in primitive terms. 5 COMP201 - Software Engineering

The Design Process Any design may be modeled as a directed graph made up of entities with attributes which participate in relationships. The system should be described at several different levels of abstraction. Design takes place in overlapping stages. It is artificial to separate it into distinct phases but some separation is usually necessary. 6 COMP201 - Software Engineering

Phases in the Design Process 7 COMP201 - Software Engineering

Design Phases Architectural design: Identify sub-systems. Abstract specification: Specify sub-systems. Interface design: Describe sub-system interfaces. Component design: Decompose sub-systems into components. Data structure design: Design data structures to hold problem data. Algorithm design: Design algorithms for problem functions. 8 COMP201 - Software Engineering

Design Computer systems are not monolithic: they are usually composed of multiple, interacting modules. Modularity has long been seen as a key to cheap, high quality software. The goal of system design is to decode: What the modules are; What the modules should do; How the modules interact with one-another 9 COMP201 - Software Engineering

Modular Programming In the early days, modular programming was taken to mean constructing programs out of small pieces: “subroutines” But modularity cannot bring benefits unless the modules are autonomous, coherent and robust 10 COMP201 - Software Engineering

Procedural Abstraction The most obvious design methods involve functional decomposition. This leads to programs in which procedures represent distinct logical functions in a program. Examples of such functions: “Display menu” “Get user option” This is called procedural abstraction 11 COMP201 - Software Engineering

Programs as Functions Another view is programs as functions: input output x  f  f (x) the program is viewed as a function from a set I of legal inputs to a set O of outputs. There are programming languages (ML, Miranda, LISP) that directly support this view of programming Well-suited to certain application domains - e.g., compilers Less well-suited to distributed, non- terminating systems - e.g., process control systems, operating systems like WinNT, ATM machines 12 COMP201 - Software Engineering

Object-Oriented Design The system is viewed as a collection of interacting objects. The system state is decentralized and each object manages its own state. Note, use of internal state against functional programming Objects may be instances of an object class and communicate by exchanging messages. 13 COMP201 - Software Engineering

Five Criteria for Design Methods We can identify five criteria to help evaluate modular design methods: Modular decomposability; Modular composability; Modular understandability; Modular continuity; Modular protection. 14 COMP201 - Software Engineering

Modular Decomposability Modular decomposability - this criterion is met by a design method if the method supports the decomposition of a problem into smaller sub-problems, which can be solved independently. In general, this method will be repetitive: sub-problems will be divided still further Top-down design methods fulfil this criterion; stepwise refinement is an example of such a method 15 COMP201 - Software Engineering

Hierarchical Design Structure 16 COMP201 - Software Engineering

Top-Down Design In principle, top-down design involves starting at the uppermost components in the hierarchy and working down the hierarchy level by level. In practice, large systems design is never truly top-down. Some branches are designed before others. Designers reuse experience (and sometimes components) during the design process. 17 COMP201 - Software Engineering

An Example of Top-Down Design COMP201 - Software Engineering 18 Imagine designing a word processor program from scratch. What subsystems could be initially found at the top level? File I/O, printing, graphical user interface, text processing etc. For each of these components we can then decompose further, i.e., File I/O comprises of saving documents and opening documents..

Modular Composability Modular composability - a method satisfies this criterion if it leads to the production of modules that may be freely combined to produce new systems. Composability is directly related to the issue of reusability Note that composability is often at odds with decomposability; top-down design, for example, it tends to produce modules that may not be composed in the way desired This is because top-down design leads to modules which fulfil a specific function, rather than a general one 19 COMP201 - Software Engineering

Examples The Numerical Algorithm Group (NAG) libraries contain a wide range of routines for solving problems in linear algebra, differential equations, etc. The Unix shell provides a facility called a pipe, written “|”, whereby the standard output of one program may be redirected to the standard input of another; this convention favours composability. 20 COMP201 - Software Engineering

Modular Understandability Abstraction int A=21 int age_in_years = 21; print_out_document(Document d) Modular Understandability - a design method satisfies this criterion if it encourages the development of modules which are easily understandable. COUNTER EXAMPLE 1. Take a thousand lines program, containing no procedures; it’s just a long list of sequential statements. Divide it into twenty blocks, each fifty statements long; make each block a method. COUNTER EXAMPLE 2. “Go to” statements. 21 COMP201 - Software Engineering

Modular Understandability Related to several component characteristics –Can the component be understood on its own? –Are meaningful names used? –Is the design well-documented? –Are complex algorithms used? Informally, high complexity means many relationships between different parts of the design. 22 COMP201 - Software Engineering

Modular Continuity Modular continuity - a method satisfies this criterion if it leads to the production of software such that a small change in the problem specification leads to a change in just one (or a small number of ) modules. EXAMPLE. Some projects enforce the rule that no numerical or textual literal should be used in programs: only symbolic constants should be used COUNTER EXAMPLE. Static arrays (as opposed to dynamic arrays) make this criterion harder to satisfy. 23 COMP201 - Software Engineering

Modular Protection Modular Protection - a method satisfied this criterion if it yields architectures in which the effect of an abnormal condition at run-time only effects one (or very few) modules EXAMPLE. Validating input at source prevents errors from propagating throughout the program (design by contract) COUNTER EXAMPLE. Using int types where subrange or short types are appropriate. 24 COMP201 - Software Engineering

A Real Life Example – Ariane 5 Flight 501 The failure of an Ariane 5 space launcher is possibly the most expensive software bug in history at around $370 million. Other bugs have been even worse by causing loss of life, for example Therac-25 radiation machines. COMP201 - Software Engineering 25

The Ariane 5 Space Launcher While developing the Ariane 5 space launcher, the designers reused a component (the inertial reference software) which was successfully used in the Ariane 4 launcher This component failed 37 seconds into the flight and the ground crew had to instruct the launcher to self-destruct. The error was caused by an unhandled numerical conversion exception causing a numeric overflow. Component reuse is usually a good thing but care must be taken that assumptions made when the component was developed are still valid! COMP201 - Software Engineering 26

Repository Models Sub systems making up a system must exchange and share data so they can work together effectively. There are two main approaches to this: The repository model – All shared data is held in a central database which may be accessed by all sub-systems Each sub-system or component maintains its own database. Data is then exchanged between sub-systems via message passing. There are advantages and disadvantages to each approach as we shall now see. COMP201 - Software Engineering 27

Repository Model The advantages include: Databases are an efficient way to share large amounts of data and data does not have to be transformed between different sub- systems (they agree on a single data representation). Sub-systems producing data need not be concerned with how that data is used by other sub-systems. Many standard operations such as backup, security, access control, recovery and data integrity are centralised and can be controlled by a single repository manager. The data model is visible through the repository schema. COMP201 - Software Engineering 28

Repository Model The disadvantages include: Sub-systems must agree on the data model which means compromises must be made, for example with performance. Evolution may be difficult since a large amount of data is generated and translation may be difficult and expensive. Different systems have different requirements for security, recovery and backup policies which may be difficult to enforce in a single database. It may be difficult to distribute the repository over a number of different machines. COMP201 - Software Engineering 29

Lecture Key Points We have studied five criteria to help evaluate modular design methods and their advantages: Modular decomposability; modular composability; modular understandability; modular continuity; modular protection. We have seen the advantages and the disadvantages of repository models COMP201 - Software Engineering 30