Chapter 1: Software design

Slides:



Advertisements
Similar presentations
Lecture 6: Software Design (Part I)
Advertisements

Software Design Fundamentals
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Lecture # 2 : Process Models
Software Modeling SWE5441 Lecture 3 Eng. Mohammed Timraz
Framework is l Reusable Code, often domain specific (GUI, Net, Web, etc) l expressed as l a set of classes and l the way objects in those classes collaborate.
1 Software Design Introduction  The chapter will address the following questions:  How do you factor a program into manageable program modules that can.
Chapter 14: Design Method --- data and architectural design Design -- A multistep process in which representations of data structure, program structure,
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
The Architecture Design Process
1 SYSTEM and MODULE DESIGN Elements and Definitions.
Jump to first page 1 System Design (Finalizing Design Specifications) Chapter 3d.
1 Lecture 5 Introduction to Software Engineering Overview  What is Software Engineering  Software Engineering Issues  Waterfall Model  Waterfall Model.
The Software Design Process CPSC 315 – Programming Studio Fall 2009.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Architectural Design Establishing the overall structure of a software system Objectives To introduce architectural design and to discuss its importance.
1/19 Component Design On-demand Learning Series Software Engineering of Web Application - Principles of Good Component Design Hunan University, Software.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
 2004 by SEC Chapter 4 Software Design. 2  2004 by SEC Chapter 4 Software Design 4.1 Design Fundamentals 4.2 Design Method 4.3 Architecture Design
SOFTWARE DESIGN.
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.
Chapter 17 GRASP: Designing Objects with Responsibilities. 1CS6359 Fall 2011 John Cole.
Design engineering Vilnius The goal of design engineering is to produce a model that exhibits: firmness – a program should not have bugs that inhibit.
Software Design Deriving a solution which satisfies software requirements.
Cohesion and Coupling CS 4311
Chapter 7 Software Engineering Introduction to CS 1 st Semester, 2015 Sanghyun Park.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 11 Slide 1 Design.
GRASP: Designing Objects with Responsibilities
Design Concepts By Deepika Chaudhary.
Software Design: Principles, Process, and Concepts Getting Started with Design.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Week 6: Software Design HNDIT Software Engineering Software Design Learning Outcomes  Understand the activities involved in the Design process.
Design Engineering 1. Analysis  Design 2 Characteristics of good design 3 The design must implement all of the explicit requirements contained in the.
Design Concepts ch-8
Principles of Programming & Software Engineering
Object Oriented Systems Design
Database Systems: Design, Implementation, and Management Tenth Edition
GRASP – Designing Objects with Responsibilities
7. Modular and structured design
Chapter 7: Software Engineering
Coupling and Cohesion Rajni Bhalla.
Cmpe 589 Spring 2006.
CS 325: Software Engineering
Chapter 1: Introduction to Systems Analysis and Design
Design engineering Prepared By:Jay A.Dave..
Lecture 9- Design Concepts and Principles
Software Design and Architecture
For University Use Only
Part 3 Design What does design mean in different fields?
About the Presentations
Chapter 5 Designing the Architecture Shari L. Pfleeger Joanne M. Atlee
CS223: Software Engineering
Chapter 20 Object-Oriented Analysis and Design
Design Model Like a Pyramid Component Level Design i n t e r f a c d s
Lecture 9- Design Concepts and Principles
Analysis models and design models
Software Design Lecture : 8
An Introduction to Software Architecture
Chapter 7 Software Engineering.
Introduction to Systems Analysis and Design Stefano Moshi Memorial University College System Analysis & Design BIT
CS310 Software Engineering Lecturer Dr.Doaa Sami
Chapter 1: Introduction to Systems Analysis and Design
Algorithms and Problem Solving
Applying Use Cases (Chapters 25,26)
Design Module view What module should the system and which have to be developed . It determines the module structure of components.
Cohesion and Coupling.
Chapter 1: Introduction to Systems Analysis and Design
From Use Cases to Implementation
DESIGN CONCEPTS AND PRINCIPLES
Presentation transcript:

Chapter 1: Software design

Software Design "You can use an eraser on the drafting table or a sledgehammer on the construction site.“ --Frank Lloyd Wright

Why software design is important? It is one of the most challenging activities of s/w development There is a high payoff associated with good design (or high penalty with bad design)

What is software design? Design bridges that gap between knowing what is needed (software requirements specification) to entering the code that makes it work (the construction phase). Design is both a verb and a noun.

What is software design? (cont...) Software engineers apply their knowledge of the problem domain and implementation technologies in order to translate system specifications into plans for the technical implementation of the software. The resulting design expresses the overall structure and organization of the planned implementation

Design Model Divided into four (4) elements: Component Level Design: transforms structural elements of the software architecture into a procedural description of software components Interface Design: describes how the software communicates with systems that interoperate with it and with humans that use it Architectural Design: defines the relationship between major structural elements of the software; architectural styles and design patterns help achieve the requirements defined for the system Data/Class Design: transforms analysis classes into design classes along with the data structures required to implement the software

Design Model

Why Design is Hard? Design is difficult because design is an abstraction of the solution which has yet to be created

Design is a wicked problem Used to describe problems in social planning but engineers have recognized it aptly describes some of the problems they face as well A wicked problem is one that can only be clearly defined by solving it Need two solutions. The first to define the problem, and the second to solve it in the most efficient way.

Design is a Universal Activity Any product that is an aggregate of more primitive elements, can benefit from the activity of design

Design Occurs at Different Levels

Characteristics of Software Design Non-deterministic – A deterministic process is one that produces the same output given the same inputs. Design is non-deterministic. No two designers or design processes are likely to produce the same output. Heuristic – because design is non-deterministic design techniques tend to rely on heuristics and rules-of-thumb rather than repeatable processes. Emergent – the final design evolves from experience and feedback. Design is an iterative and incremental process where a complex system arises out of relatively simple interactions.

The Evolution of Designs Design as a single step in the software life cycle is somewhat idealized. More often the design process is iterative and incremental. Designs tend to evolve over time based on experience with their implementation.

The Benefits of Good Design Good design reduces software complexity which makes the software easier to understand and modify It enables reuse. Good design makes it easier to reuse code Complexity is the root cause of other problems such as security. A program that is difficult to understand is more likely to be vulnerable to exploits than one that is simpler.

A Generic Design Process Understand the problem (software requirements). Construct a “black-box” model of solution (system specification). System specifications are typically represented with use cases (especially when doing OOD). Look for existing solutions (e.g. architecture and design patterns) that cover some or all of the software design problems identified. Design not complete? Consider using one or more design techniques to discover missing design elements Noun-verb analysis, CRC Cards, step-wise refinement, etc. Take final analysis model and pronounce a first-draft design (solution) model Consider building prototypes Document and review design Iterate over solution (Refactor) (Evolve the design until it meets functional requirements and maximizes non-functional requirements)

Inputs to the design process User requirements and system specification (including any constraints on design and implementation options) Domain knowledge (For example, if it’s a healthcare application the designer will need some knowledge of healthcare terms and concepts.) Implementation knowledge (capabilities and limitations of eventual execution environment)

Attributes of a design Static structure of system (components and their relationships) Interactions between components System data and its structure (database scheme) Physical packaging and distribution of components Algorithms

General Software Design Principles Modularization Coupling Cohesion Abstraction

Modularization The goal of design is to partition the system into modules:- High cohesion within modules, and Loose coupling between modules Modularity reduces the total complexity a programmer has to deal with at any one time assuming: Functions are assigned to modules in away that groups similar functions together (Separation of Concerns), and There are small, simple, well-defined interfaces between modules (information hiding)

Modularization: Trade-Offs What is the "right" number of modules for a specific software design? module development cost cost of software module integration cost optimal number number of modules of modules

Coupling Coupling is the measure of dependency between modules. A dependency exists between two modules if a change in one could require a change in the other. The degree of coupling between modules is determined by: The number of interfaces between modules (quantity), and Complexity of each interface (determined by the type of communication) (quality)

Coupling: Types of Coupling Content coupling (also known as Pathological coupling) Common coupling Control coupling Stamp coupling Data coupling

Coupling: Content Coupling One module directly references the contents of another One module modifies the local data or instructions of another One module refers to local data in another One branches to a local label of another

Coupling: Common Coupling Two or more modules connected via global data. One module writes/updates global data that another module reads

Coupling: Control Coupling One module determines the control flow path of another. Example: print(milesTraveled, displayMetricValues) . . . public void print(int miles, bool displayMetric) { if (displayMetric) { System.out.println(. . .); else { . . .} }

Coupling: Stamp Coupling Passing a composite data structure to a module that uses only part of it. Example: passing a record with three fields to a module that only needs the first two fields.

Coupling: Coupling between CSS and JavaScript A well-designed web app modularizes around: HTML files which specify data and semantics CSS rules which specify the look and formatting of HTML data JavaScript which defines behavior/interactivity of page Assume you have the following HTML and CSS definitions.

Coupling: Coupling between CSS and JavaScript <!doctype html> <html> <head> <script type="text/javascript" src="base.js"></script> <link rel="stylesheet" href="default.css"> </head> <body> <button onclick="highlight2()">Highlight</button> <button onclick="normal2()">Normal</button> <h1 id="title" class="NormalClass">CSS <--> JavaScript Coupling</h1> </body> </html> HTML .NormalClass { color:inherit; font-style:normal; } CSS Output

Cohesion Cohesion is a measure of how strongly related the functions or responsibilities of a module are. A module has high cohesion if all of its elements are working towards the same goal.

Cohesion and Coupling The best designs have high cohesion (also called strong cohesion) within a module and low coupling (also called weak coupling) between modules.

Abstraction Abstraction is a concept used to manage complexity An abstraction is a generalization of something too complex to be dealt with in its entirety Abstraction is for humans not computers

Software Design Strategies Structured Design Object Oriented Design