Slide Set 9 Design Engineering
Slide Set 9 Design Engineering
Slide Set - 8
Organized & Presented By:
Software Engineering Team CSED
TIET, Patiala
Chapter 9
Design Engineering
- Introduction
- Design quality
- Design concepts
- The design model
6
From Analysis Model to
Design Model
• Each element of the analysis model provides information that is
necessary to create the four design models
– The data/class design transforms analysis classes into design classes along
with the data structures required to implement the software
– The 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
– The interface design describes how the software communicates with
systems that interoperate with it and with humans that use it
– The component-level design transforms structural elements of the software
architecture into a procedural description of software components
8
From Analysis Model to
Design Model (continued)
Component-level Design
Interface Design
Architectural Design
Data/Class Design
10
(More on next slide)
Task Set for Software Design
(continued)
5) Design any interface required with external systems or devices
6) Design the user interface
7) Conduct component-level design
a) Specify all algorithms at a relatively low level of abstraction
b) Refine the interface of each component
c) Define component-level data structures
d) Review each component and correct all errors uncovered
8) Develop a deployment model
▪ Show a physical layout of the system, revealing which components will
be located where in the physical computing environment
11
Design Quality
Quality's Role
• The importance of design is quality
• Design is the place where quality is fostered
– Provides representations of software that can be assessed for quality
– Accurately translates a customer's requirements into a finished software
product or system
– Serves as the foundation for all software engineering activities that follow
• Without design, we risk building an unstable system that
– Will fail when small changes are made
– May be difficult to test
– Cannot be assessed for quality later in the software process when time is
short and most of the budget has been spent
• The quality of the design is assessed through a series of formal
technical reviews or design walkthroughs
13
Goals of a Good Design
• The design must implement all of the explicit requirements contained
in the analysis model
– It must also accommodate all of the implicit requirements desired by the
customer
• The design must be a readable and understandable guide for those who
generate code, and for those who test and support the software
• The design should provide a complete picture of the software,
addressing the data, functional, and behavioral domains from an
implementation perspective
"Writing a clever piece of code that works is one thing; designing something
that can support a long-lasting business is quite another."
14
Design Quality Guidelines
1) A design should exhibit an architecture that
a) Has been created using recognizable architectural styles or patterns
b) Is composed of components that exhibit good design characteristics
c) Can be implemented in an evolutionary fashion, thereby facilitating
implementation and testing
2) A design should be modular; that is, the software should be logically
partitioned into elements or subsystems
3) A design should contain distinct representations of data, architecture,
interfaces, and components
4) A design should lead to data structures that are appropriate for the
classes to be implemented and are drawn from recognizable data
patterns
18
Data Abstraction
door
manufacturer
model number
type
swing direction
inserts
lights
type
number
weight
opening mechanism
19
Procedural Abstraction
open
details of enter
algorithm
20
Design Concepts
• Abstraction
– Procedural abstraction – a sequence of instructions that have a specific and
limited function
– Data abstraction – a named collection of data that describes a data object
• Architecture
– The overall structure of the software and the ways in which the structure
provides conceptual integrity for a system
– Consists of components, connectors, and the relationship between them
• Patterns
– A design structure that solves a particular design problem within a specific
context
– It provides a description that enables a designer to determine whether the pattern
is applicable, whether the pattern can be reused, and whether the pattern can
serve as a guide for developing similar patterns
22
(more on next slide)
Design Concepts (continued)
• Stepwise refinement
– Development of a program by successively refining levels of procedure
detail
– Complements abstraction, which enables a designer to specify procedure
and data and yet suppress low-level details
• Refactoring
– A reorganization technique that simplifies the design (or internal code
structure) of a component without changing its function or external
behavior
– Removes redundancy, unused design elements, inefficient or unnecessary
algorithms, poorly constructed or inappropriate data structures, or any
other design failures
• Design classes
– Refines the analysis classes by providing design detail that will enable the
classes to be implemented
– Creates a new set of design classes that implement a software
infrastructure to support the business solution
23
Modularity: Trade-offs
What is the "right" number of modules
for a specific software design?
cost of
software
module
integration
cost
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided
with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 24
Types of Design Classes
• User interface classes – define all abstractions necessary for
human-computer interaction (usually via metaphors of real-world objects)
• Business domain classes – refined from analysis classes; identify
attributes and services (methods) that are required to implement some
element of the business domain
• Process classes – implement business abstractions required to fully
manage the business domain classes
• Persistent classes – represent data stores (e.g., a database) that will persist
beyond the execution of the software
• System classes – implement software management and control functions
that enable the system to operate and communicate within its computing
environment and the outside world
25
Characteristics of a Well-Formed
Design Class
• Complete and sufficient
– Contains the complete encapsulation of all attributes and methods that exist for the
class
– Contains only those methods that are sufficient to achieve the intent of the class
• Primitiveness
– Each method of a class focuses on accomplishing one service for the class
• High cohesion
– The class has a small, focused set of responsibilities and single-mindedly applies
attributes and methods to implement those responsibilities
• Low coupling
– Collaboration of the class with other classes is kept to an acceptable minimum
– Each class should have limited knowledge of other classes in other subsystems
26
The Design Model
Component-level Design
Interface Design
Architectural Design
Data/Class Design
The Design Model
Analysis model
Abstraction Dimension
Design model
30
(More on next slide)
Introduction (continued)
• Design model elements are not always developed in a sequential
fashion
– Preliminary architectural design sets the stage
– It is followed by interface design and component-level design, which often
occur in parallel
• The design model has the following layered elements
– Data/class design
Component-level Design
– Architectural design
– Interface design
– Component-level design
Interface Design
• A fifth element that follows all of
the others is deployment-level design
Architectural Design
Data/Class Design
31
Design Elements
• Data/class design
– Creates a model of data and objects that is represented at a high level of
abstraction
• Architectural design
– Depicts the overall layout of the software
• Interface design
– Tells how information flows into and out of the system and how it is
communicated among the components defined as part of the architecture
– Includes the user interface, external interfaces, and internal interfaces
• Component-level design elements
– Describes the internal detail of each software component by way of data
structure definitions, algorithms, and interface specifications
• Deployment-level design elements
– Indicates how software functionality and subsystems will be allocated within
the physical computing environment that will support the software
32
Design Model Elements
• Data elements
– Data model --> data structures
– Data model --> database architecture
• Architectural elements
– Application domain
– Analysis classes, their relationships, collaborations and behaviors are transformed into
design realizations
– Patterns and “styles” (Chapter 10)
• Interface elements
– the user interface (UI)
– external interfaces to other systems, devices, networks or other producers or
consumers of information
– internal interfaces between various design components.
• Component elements
• Deployment elements
33
Interface Elements
☺
37