0% found this document useful (0 votes)
66 views38 pages

SE Unit 4

The document discusses key concepts in software design including that design encompasses principles and practices that lead to high-quality systems, design bridges technology and human purpose, and the design model provides architectural and implementation details. Good design exhibits qualities like being bug-free, suitable for its purpose, and a pleasurable user experience. Design sits at the technical core of software engineering and transforms requirements into implementation models.

Uploaded by

richie053
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views38 pages

SE Unit 4

The document discusses key concepts in software design including that design encompasses principles and practices that lead to high-quality systems, design bridges technology and human purpose, and the design model provides architectural and implementation details. Good design exhibits qualities like being bug-free, suitable for its purpose, and a pleasurable user experience. Design sits at the technical core of software engineering and transforms requirements into implementation models.

Uploaded by

richie053
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 38

Design

 Software design encompasses the set of principles, concepts, and


practices that lead to the development of a high-quality system or
product.
 Design is where you stand with a foot in two worlds – the world
of technology and the world of human purpose – and you try to
bring the two together.
 Design model provides details about software architecture, data
structures, interfaces, and components that are necessary to
implement the system.
Design
 Good software design should exhibit:
 Firmness: A program should not have any bugs that inhibit
its function.
 Commodity: A program should be suitable for the purposes
for which it was intended.
 Delight: The experience of using the program should be
pleasurable one.
Design
 Software design sits at the technical kernel(central
component) of software engineering and is applied regardless
of the software process model that is used.
 After requirement modeling, it is the last action within the
modeling activity and sets the stage for construction
 Elements of the requirements model provides information that
is necessary to create the four design models required for a
complete specification of design.
Requirements Model -> Design Model

Co m p o n e n t -
s c e na rio - ba s e d f lo w- o rie nt e d Le v e l D e s ig n
e le me nt s e le me nt s
us e-cas es - text data flow diagrams
us e-cas e diagrams control-flow diagrams
activity diagrams proces s ing narratives
s wim lane diagrams
In t e rf a c e D e s ig n
Ana lys is Mode l

A rc h it e c t u ra l D e s ig n
c la ss- ba se d be ha v io ra l
e le me nt s e le me nt s
clas s diagrams s tate diagrams
analys is packages s equence diagrams
CRC models D a t a / Cla s s D e s ig n
collaboration diagrams

Desig n Mo d el
Design
 The data/class design transforms class models into design class
realizations and the requisite data structures required to
implement the software.
 The objects and relationships defined in the CRC diagram and
the detailed data content depicted by class attributes
 The architectural design defines the relationship between
structural elements of the software, the architectural styles and
design patterns that can be used to achieve the requirements
defined for the system, and the constraints that affect the way in
which architecture can be implemented.
Design
 The interface design describes how the software communicates with
systems that interoperate with it, and with humans who use it.
 An interface implies a flow of information (data/control) and a specific
type of behavior.
 The component-level design transforms structural elements of the
software architecture into a procedural description of software
components.
 Information obtained from the class-based models, flow models, and
behavioral models serve as the basis for component design.
Design and Quality
 The importance of design can be stated with a single word – quality.
 Design is the only way that you can accurately translate stakeholder’s
requirements into a finished software products
 Software design serves as the foundation for all the software
engineering and support activities that follow.
 Without design, you risk building an unstable system – one that will
fail when small changes are made; one that may be difficult to test; one
whose quality cannot be assessed until late in the software process,
when time is short and many dollars have already been spent.
Design Process
 It is an iterative process through which requirements are translated
into a “blueprint” for constructing the software.

 Initially, the blueprint depicts a holistic view of software. That is the


design is represented at a high level of abstraction- a level that can be
directly traced into the specific system objective and more detailed
data, functional, and behavioral requirements.

 As design iteration occur, subsequent refinement leads to design


representations at much lower level of abstraction with subtle
connection to requirements.
Design Process: Software Design
Characteristics
Three characteristics that serve as a guide for the evaluation of a
good design.
 The design must implement all of the explicit requirements
contained in the analysis model, and it must accommodate all
of the implicit requirements desired by the customer.
 The design must be a readable, understandable guide for those
who generate code and for those who test and subsequently
support the software.
 The design should provide a complete picture of the software,
addressing the data, functional, and behavioral domains from
an implementation perspective.
Implicit requirements: what everyone
expects and won’t need writing down

 Types of implicit requirements (for developing


software products):
• Stability
• Privacy and security
Explicit requirements: what the product team
writes down.

 Explicit requirements are the details the product


team captures and shares with stakeholders. These
requirements might show up in several formats,
including:
• Product backlog
• Sprint backlog
• Product roadmap
• Acceptance criteria
• Software requirements document
Technical Criteria for Good
Design
1. A design should exhibit an architecture that (1) has been
created using recognizable architectural styles or patterns, (2)
is composed of components that exhibit good design
characteristics and (3) can be implemented in an evolutionary
fashion
1. For smaller systems, design can sometimes be developed linearly.
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.
5. A design should lead to components that exhibit independent
functional characteristics.
6. A design should lead to interfaces that reduce the complexity
of connections between components and with the external
environment.
7. A design should be derived using a repeatable method that is
driven by information obtained during software requirements
analysis.
8. A design should be represented using a notation that
effectively communicates its meaning.
Design
Principles


The design process should not suffer from ‘tunnel vision.’
The design should be traceable to the analysis model.
 The design should not reinvent the wheel.
 The design should “minimize the intellectual distance”
between the software and the problem as it exists in the
real world.
 The design should exhibit uniformity and integration.
 The design should be structured to accommodate change.
 The design should be structured to degrade gently, even
when aberrant data, events, or operating conditions are
encountered.
 Design is not coding, coding is not design.
 The design should be assessed for quality as it is being
created, not after the fact.
 The design should be reviewed to minimize conceptual
(semantic) errors.
Design Quality Attributes
(FURPS)
 Functionality: evaluate the feature set and
capabilities of the program, the generality of the
functions that are delivered , and the security of
the overall system.
 Usability is assessed by considering human
factors, overall aesthetics, consistency, and
documentation.
 Reliability is evaluated by measuring the frequency
and severity of failure, the accuracy of output
results, the mean-time-to-failure, the ability to
recover form failure, and the predictability of the
program.
 Performance is measured by considering
processing speed, response time, resource
consumption, throughput, and efficiency.
 Supportability combines the ability to extend the
From Hewlett-Packard [Gra87]]
program, adaptability, serviceability,
maintainability, testability, compatibility,
configurability.
Fundamental
Concepts
A set of fundamental software design concepts
has evolved over the history of software
engineering. They span both traditional and
object-oriented software development.

 Fundamental software design concepts provide the necessary


framework for “getting it right”.
Fundamental
Concepts


Abstraction—data, procedure, control
Architecture—the overall structure of the software
 Patterns—”conveys the essence” of a proven design
solution
 Separation of concerns—any complex problem can be more easily
handled if it is subdivided into pieces
 Modularity—compartmentalization of data and function
 Hiding—controlled interfaces
 Functional independence—single-minded function and
low coupling
 Refinement—elaboration of detail for all abstractions
 Aspects—a mechanism for understanding how global
requirements affect design
 Refactoring—a reorganization technique that simplifies
the design
 OO design concepts—Appendix II
 Design Classes—provide design detail that will enable analysis
classes to be implemented
 A procedural abstraction refers to a
sequence of instructions that have a specific
and limited function
 open for a door. Open implies a long
sequenceof procedural steps (e.g., walk to
the door, reach out and grasp knob, turn knob
andpull door, step away from moving door,
etc.)
 A data abstraction is a named collection of
data that describes a data object.
 In the context of the procedural abstraction
open, we can define a data abstraction called
door.
 door would encompass a set of attributes
that describe the door (e.g., door type, swing
direction, opening mechanism, weight,
dimensions)
Data
Abstraction door

manufacturer
model number
type
swing direction
inserts
lights
type
number
weight
opening mechanism

implemented as a data structure

A data abstraction is a named collection of


data that describes a data object.
Procedural
Abstraction open

details of enter
algorithm

implemented with a "knowledge" of the


object that is associated with enter

A procedural abstraction refers to a sequence of instructions


that have a specific and limited function.
Architecture
“The overall structure of the software and the ways in which that
structure provides conceptual integrity for a system.”
What properties should be specified?
• Structural properties. defines the components of a system (e.g., modules, objects,
filters) and the manner in which those components are packaged and interact with one
another.

• Extra-functional properties. should address how the design architecture achieves


requirements for performance, capacity, reliability, security, adaptability, and other
system characteristics.

• Families of related systems. should draw upon repeatable patterns that are commonly
encountered in the design of families of similar systems. In essence, the design should
have the ability to reuse architectural building blocks.
Pattern
• A design pattern describes a design structure that solves a
particular design problem
• The intent of each design pattern is to provide a description
that enables a designer to determine
• (1) whether the pattern is applicable to the current work,
• (2) whether the pattern can be reused (hence, saving design
time),
• (3) whether the pattern can serve as a guide for developing a
similar, but functionally or structurally different pattern.
Separation of Concerns
 Any complex problem can be more easily handled if it is
subdivided into pieces that can each be solved and/or
optimized independently
 A concern is a feature or behavior that is specified as part of
the requirements model for the software
 By separating concerns into smaller, and therefore more
manageable pieces, a problem takes less effort and time to
solve.
Modularity
 “Modularity is the single attribute of software that allows a program
to be intellectually manageable“.
 Monolithic software (i.e., a large program composed of a single
module) cannot be easily grasped by a software engineer.
 The number of control paths, span of reference, number of variables, and
overall complexity would make understanding close to impossible.
 In almost all instances, you should break the design into many
modules, hoping to make understanding easier and as a
consequence, reduce the cost required to build the software.
Modularity
Information
Hiding
module • algorithm
controlled
interface • data structure
• details of external interface
• resource allocation policy

clients "secret"

a specific design decision


Why Information
Hiding?
 modules should be specified and
designed so that information (algorithms
and data) contained within a module
is_x0002_inaccessible to other modules
that have no need for such information.

 reduces the likelihood of “side effects”


 limits the global impact of local design
decisions
 emphasizes communication through
controlled interfaces
 discourages the use of global data
 leads to encapsulation—an attribute of
high quality design
Functional
Independence
 Cohesion is an indication of the relative functional
strength of a module.
 A cohesive module performs a single task, requiring little
interaction with other components in other parts of a
program. Stated simply, a cohesive module should
(ideally) do just one thing.
 Coupling is an indication of the relative interdependence
among modules.
 Coupling depends on the interface complexity between
modules, the point at which entry or reference is made to a
module, and what data pass across the interface.
Aspects
 An aspect is a representation of a cross-cutting concern.
 These concerns “include requirements, use cases,
features, data structures, quality-of-service issues,
variants, intellectual property boundaries,
collaborations, patterns and contracts”.
 It is important to identify aspects so that the design can
properly accommodate them as refinement and
modularization.
 An aspect is implemented as a separate module
(component).
Refactori
ng
 An important design activity suggested for many agile
methods, it is reorganization technique that simplifies
the design of a component.

 "Refactoring is the process of


changing a software system in such a
way that it does not alter the external
behavior of the code [design] yet
improves its internal structure.”
 When software is refactored, the existing design is
examined for
 redundancy
 unused design elements
 inefficient or unnecessary algorithms
 poorly constructed or inappropriate data structures
 or any other design failure that can be corrected to yield
a better design.
OO Design
Concepts
 Requirements model defines a set of analysis classes. Each
describes some element of the problem domain, focusing on
aspects of the problem that are user visible. The level of
abstraction is high.

 Five different types of design classes, each representing a


different layer of the design architecture:
 User interface classes
 Business domain classes
 Process classes
 Persistent classes
 System classes
Design
Classes
 Design classes in three big categories
 Entity classes
 Boundary classes
 Controller classes
 Inheritance—all responsibilities of a superclass is
immediately inherited by all subclasses
 Messages—stimulate some behavior to occur in the
receiving object
 Polymorphism—a characteristic that greatly reduces
the effort required to extend the design
Design
Classes
 Analysis classes are refined during design to
become entity classes
 Boundary classes are developed during design to
create the interface (e.g., interactive screen or
printed reports) that the user sees and interacts
with as the software is used.
 Boundary classes are designed with the responsibility
of managing the way entity objects are represented to
users.
 Controller classes are designed to manage
 the creation or update of entity objects;
 the instantiation of boundary objects as they obtain
information from entity objects;
 complex communication between sets of objects;
 validation of data communicated between objects or
between the user and the application.
The Design Model
hig h

a n a ly s is m o d e l

c la s s dia gr a ms
a na lys is pa c ka ge s
us e - c a s e s - t e xt c la s s dia gr a ms
Re quire m e nt s :
CRC mode ls us e - c a s e dia gr a ms c ons t ra int s
a na lys is pa c ka ge s
c olla bor a t ion dia gr a ms
a c t ivit y dia gr a ms CRC mode ls int e rope ra bilit y
da t a f low dia gr a ms s w im la ne dia gr a ms c olla bor a t ion dia gr a ms t a rge t s a nd
c ont r ol- f low dia gr a ms c olla bor a t ion dia gr a ms da t a f low dia gr a ms
pr oc e s s ing na r r a t ive s s t a t e dia gr a ms c ont r ol- f low dia gr a ms
c onf igura t ion
s e que nc e dia gr a ms pr oc e s s ing na r r a t ive s
s t a t e dia gr a ms
s e que nc e dia gr a ms

de s ign c la s s r e a liz a t ions


s ubs ys t e ms
c olla bor a t ion dia gr a ms t e c hnic a l int e r f a c e c ompone nt dia gr a ms
de s ign c la s s r e a liz a t ions
de s ign de s ign c la s s e s
s ubs ys t e ms
Na viga t ion de s ign a c t ivit y dia gr a ms
c olla bor a t ion dia gr a ms
GUI de s ign s e que nc e dia gr a ms
c ompone nt dia gr a ms
d e s ig n m o d e l de s ign c la s s e s
re f ine m e nt s t o: a c t ivit y dia gr a ms
re f ine m e nt s t o: s e que nc e dia gr a ms
c ompone nt dia gr a ms
de s ign c la s s r e a liz a t ions de s ign c la s s e s
s ubs ys t e ms a c t ivit y dia gr a ms
lo w c olla bor a t ion dia gr a ms s e que nc e dia gr a ms de ployme nt dia gr a ms

a rc hit e c t ure int e rfa c e c o m po ne nt -le ve l de plo ym e nt -le ve l


e le m e nt s e le m e nt s e le m e nt s e le m e nt s

p ro c e s s d im e ns io n
Design Model Elements
 Data elements
 Data model --> the program component level, the design
of data structures and the associated algorithms
required to manipulate Data model --> At the application
level, the translation of a data model into a database
 Architectural elements
 The architectural model is derived from three sources:
 (1) information about the application domain for the
software to be built (2) specific requirements model
elements such as data flow diagrams or analysis classes,
their relationshipsand collaborations for the problem at
hand;
 (3) the availability of architectural styles
 Interface elements
 There are three important elements of interface design:
 (1) the user interface (UI);
 (2) external interfaces to other systems, devices,
networks, or other producers orconsumers of
information; and
 (3) internal interfaces between various design
com_x0002_ponents.
 Component elements
Architectural Elements
 The architectural model is derived from three
sources:
 Information about the application domain for the
software to be built;
 Specific requirements model elements such as data
flow diagrams or analysis classes, their relationships
and collaborations for the problem at hand, and
 The availability of architectural patterns and styles
Interface
Elements
Mo b ile Ph o n e

 How information flows in and out of Wire le ssPDA

the system and how components


communicate and collaborate.
Co n t ro lPa n e l

 Three major elements: LCDdis pla y


LEDindic a t ors

User interface
ke yPa dCha ra c t e ris t ic s Ke y Pa d
 s pe a ke r
wire le s s Int e rfa c e

External interface to other system,


re a dKe ySt roke ()
 de c ode Ke y ()
dis pla ySt a t us ()

device, networks or producers or


light LEDs ()
s e ndCont rolMs g()

consumers of information
< < in t e rfa c e > >
Ke y Pa d

 Internal interfaces between components. re a dKe ys t roke()


de c ode Ke y()

Fig u re 9 . 6 UML in t e rfa c e re p re se n t a t io n fo r Co n t ro lP a n e l


Component
Elements
SensorManagement
Sensor

 Describe the internal details of each software


components. It defines data structure for all local data
objects and algorithmic details for all processing that
occurs within a component and an interface that allows
access to all component operations.
 .
Deployment Elements
 How software functionality and
Co n t ro l Pa n e l CPI s e rv e r

Security homeownerAccess

subsystems will be allocated within


the physical computing
environment that will support the
software. Pe rsona l c omput e r

 externalAccess

Security Surveillance

homeManagement communication

Fig u re 9 . 8 UML d e p lo y m e n t d ia g ra m fo r S a fe Ho m e

You might also like