Unit - 1 Design Process
Unit - 1 Design Process
UNIT III
SOFTWARE DESIGN
1
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
2
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
3.2.1 Abstraction
Each step in the software process is a refinement in the level of abstraction of the software solution.
A procedural abstractionis a named sequence of instructions that has a specific and limited
function.
An example of a procedural abstraction would be the word open for a door. Open implies a long
sequence of procedural steps (e.g.,walk to the door, reach out and grasp knob, turn knob and pull
door, step away from moving door, etc.).
A data abstractionis a named collection of data that describes a data object
An example of data abstraction called door. Like any data object, the data abstraction for door
would encompass set of attributes that describe the door (e.g., door type, swing direction, opening
mechanism, weight, dimensions).
It follows that the procedural abstraction open would make use of information contained in the
attributes of the data abstraction door.
Control abstraction is the third form of abstraction used in software design. Control abstraction
implies a program control mechanism without specifying internal details.
o An example of a control abstraction is the synchronization semaphore] used to
o coordinate activities in an operating system.
3.2.2 Software Architecture
Software architecture means “the overall structure of the software and the ways in which that
structure provides conceptual integrity for a system”. A set of architectural patterns enable a software
engineer to reuse design level concepts.
Properties that should be specified as part of an architectural design:
a) Structural properties. This aspect of the architectural design representation 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. For example, objects are packaged to encapsulate both
data and the processing that manipulates the data and interact via the invocation of methods.
b) Extra-functional properties. The architectural design description should address how the design
architecture achieves requirements for performance, capacity, reliability, security, adaptability, and
other system characteristics.
The architectural design can be represented using one or more of a number of different models.
c) Families of related systems. The architectural design 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.
Model Functioning
Structural models Represent architecture as an organized collection of program components.
Framework models Increase the level of design abstraction by attempting to identify
repeatable architectural design frameworks (patterns) that are encountered in
similar types of applications.
Dynamic models Address the behavioural aspects of the program architecture, indicating how
the structure or system configuration may change as a function of external
events.
Process models Focus on the design of the business or technical process that the system
must accommodate.
4
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
3.2.3 Patterns
Brad Appleton defines a design pattern in the following manner: “A pattern is a named nugget of
insight which conveys the essence of a proven solution to a recurring problem within a certain
context amidst competing concerns”
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), and
(3) Whether the pattern can serve as a guide for developing a similar, but functionally or
structurally different pattern.
3.2.4 Separation of Concerns
Separation of concerns is a design concept [Dij82] that suggests that 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 behaviour 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.
3.2.5 Modularity
Software is divided into separately named and addressable components, often called modules
that are integrated to satisfy problem requirements.
It has been stated that "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.
6
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
To accomplish this, the design architecture should support a mechanism for defining an aspect—a
module that enables the concern to be implemented across all other concerns that it crosscuts.
3.2.10 Refactoring
Refactoring is a reorganization technique that simplifies the design (or code) of a component without
changing its function or behaviour.
Fowler defines “Refactoring is the process of changing a software system in such a way that it does
not alter the external behaviour of the code [design] improves its internal structure.” Benefits of
refactoring:
The redundancy can be achieved.
Inefficient algorithms can be eliminated or can be replaced by efficient one.
Poorly constructed or inaccurate data structures can be removed or replaced.
3.2.11 Object-Oriented Design Concepts:
The object-oriented (OO) paradigm is widely used in modern software engineering.
OO design concepts such as classes and objects, inheritance, messages, and polymorphism.
3.2.12 Design Classes
A set of design classes that refine the analysis classes by providing design detail that will enable the
classes to be implemented, and implement a software infrastructure that supports the business
solution.
There are five different types of design classes.
Design classes
7
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
Referring to Figure 3.3, the dashed line indicates the boundary between the analysis and design
models.
The elements of the design model use many of the same UML diagrams that were used in the analysis
model.
The difference is that these diagrams are refined and elaborated as part of design; more
implementation-specific detail is provided, and architectural structure and style, components that
reside within the architecture, and interfaces between the components and with the outside world are
all emphasized.
Dimensions of the design model
3.3.1 Data Design Elements
Data design referred to as data architecting creates a model of data and/or information that is
represented at a high level of abstraction (the customer/user’s view of data).
This data model is then refined into progressively more implementation-specific representations that
can be processed by the computer-based system.
8
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
10
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
iii) Interface inconsistency is an indication of low cohesion. The module in question should be re-
evaluated.
5. Define modules whose function is predictable, but avoid modules that are overly restrictive.
i) A module is predictable when it can be treated as a black box; that is, the same external data will be
produced regardless of internal processing details.
ii) Modules that have internal "memory" can be unpredictable.
iii) A module that restricts processing to a single sub function exhibits high Cohesion.
6. Strive for “controlled entry” modules by avoiding "pathological connections."
i) This design heuristic warns against content coupling.
ii) Software is easier to understand and therefore easier to maintain when module interfaces are
constrained and controlled.
iii) Pathological connection refers to branches or references into the middle of a module.
11
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
• Architecture “constitutes a relatively small, intellectually graspable model of how the system is
structured and how its components work together”.
12
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
If the data flow degenerates into a single line of transforms, it is termed batch sequential. This pattern
accepts a batch of data and then applies a series of sequential components (filters) to transform it.
15
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
To illustrate the use of the ACD, consider the home security function of the SafeHomeproduct. The
overall SafeHomeproduct controller and the Internet-based system are both superordinate to the
security function and are shown above the function in Figure 3.12.
Figure 3.12 Architectural context diagram for the SafeHome security function
3.7.2 Defining Archetypes
An archetype is a class or pattern that represents a core abstraction that is critical to the design of
architecture for the target system.
The target system architecture is composed of these archetypes, which represent stable elements of
the architecture but may be instantiated many different ways based on the behaviour of the system.
The SafeHome home security function, defines the following archetypes:
Node.Represents a cohesive collection of input and output elements of the home security function.
For example a node might be comprised of (1) various sensors and (2) a variety of alarm (output)
indicators.
Detector.An abstraction that encompasses all sensing equipment that feeds information into the
target system.
Indicator. An abstraction that represents all mechanisms (e.g., alarm siren, flashing lights, bell) for
indicating that an alarm condition is occurring.
Controller. An abstraction that depicts the mechanism that allows the arming or disarming of a
node. If controllers reside on a network, they have the ability to communicate with one another.
16
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
18
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
Figure 3.16 Level 2 DFD that refines the monitor sensors transform
Step 4. Isolate the transform centre by specifying incoming and outgoing flow boundaries
Incoming flow as a path in which information is converted from external to internal form; outgoing
flow converts from internal to external form.
Figure 3.17 Level 3 DFD for monitor sensors with flow boundaries
Incoming and outgoing flow boundaries are open to interpretation. That is, different designers may
select slightly different points in the flow as boundary locations. In fact, alternative design solutions
can be derived by varying the placement of flow boundaries.
Flow boundaries for the example are illustrated as shaded curves running vertically through the flow
in Figure. The transforms (bubbles) that constitute the transform centre lie within the two shaded
boundaries that run from top to bottom in the figure.
Step 5. Perform "first-level factoring."
When transform flow is encountered, a DFD is mapped to a specific structure (a call and return
architecture) that provides control for incoming, transform, and outgoing information processing.
19
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
An incoming information processing controller, called sensor input controller, coordinates receipt
of all incoming data.
Figure 3.18 Level 3 DFD for monitor sensors with flow boundaries
A transform flow controller, called alarm conditions controller, supervises all operations on data in
internalized form (e.g., a module that invokes various data transformation procedures).
An outgoing information processing controller, called alarm output controller, coordinates
production of output information.
20
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
Although Figure 3.20 illustrates a one-to-one mapping between DFD transforms and software
modules, different mappings frequently occur.
Two or even three bubbles can be combined and represented as one module (recalling potential
problems with cohesion) or a single bubble may be expanded to two or more modules.
Second-level factoring for incoming flow follows in the same manner. Factoring is again
accomplished by moving outward from the transform centre boundary on the incoming flow side.
21
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
Step 7. Refine the first-iteration architecture using design heuristics for improved software
quality.Many modifications can be made to the first iteration architecture developed for the Safe
Home monitor sensors subsystem. Among many possibilities,
1. The incoming controller can be removed because it is unnecessary when a single incoming flow
path is to be managed.
2. The substructure generated from the transform flow can be imploded into the module establish
alarm conditions (which will now include the processing implied by select phone number). The
transform controller will not be needed and the small decrease in cohesion is tolerable.
3. The modules format display and generate display can be imploded (we assume that display
formatting is quite simple) into a new module called produce display.
The refined software structure for the monitor sensors subsystem is shown in Figure 3.22.
The objective of the preceding seven steps is to develop an architectural representation of software.
Design Steps
The design steps for transaction mapping are similar and in some cases identical to steps for
transform mapping (Section 14.6).
A major difference lies in the mapping of DFD to software structure.
Step 1. Review the fundamental system model.
Step 2. Review and refine data flow diagrams for the software.
Step 3. Determine whether the DFD has transform or transaction flow
characteristics.
Figure 3.23Level 2 DFD for user interaction subsystem with flow boundaries
Steps 1, 2, and 3 are identical to corresponding steps in transform mapping.
The DFD shown in Figure 3.23 has a classic transaction flow characteristic.
However, flow along two of the action paths emanating from the invoke command processing bubble
appears to have transform flow characteristics. Therefore, flow boundaries must be established for
both flow types.
Step 4. Identify the transaction centre and the flow characteristics along
each of the action paths.
The location of the transaction centre can be immediately discerned from the DFD.
The transaction centre lies at the origin of a number of actions paths that flow radially from it. For
the flow shown in Figure3.23, the invoke command processing bubble is the transaction centre.
The incoming path (i.e., the flow path along which a transaction is received) and all action paths
must also be isolated.
Boundaries that define reception path and action paths are also shown in the figure 3.25. Each action
path must be evaluated for its individual flow characteristic. For example, the "password"
23
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
path has transform characteristics. Incoming, transform, and outgoing flow are indicated with
boundaries.
Step 5. Map the DFD in a program structure amenable to transaction processing.
Transaction flow is mapped into an architecture that contains an incoming branch and a dispatch
branch.
The structure of the incoming branch is developed in much the same way as transform mapping.
Starting at the transaction centre, bubbles along the incoming path are mapped into modules. The
structure of the dispatch branch contains a dispatcher module that controls all subordinate action
modules.
Each action flow path of the DFD is mapped to a structure that corresponds to its specific flow
characteristics. This process is illustrated schematically in Figure 3.23
Considering the user interaction subsystem data flow, first-level factoring for step 5 is shown in
Figure 3.25.
The bubbles read user command and activate/deactivate system map directly into the architecture
without the need for intermediate control modules.
24
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
Step 6. Factor and refine the transaction structure and the structure of each action path.
Each action path of the data flow diagram has its own information flow characteristics.
We have already noted that transform or transaction flow may been countered. The action path-
related "substructure" is developed using the design steps discussed in this and the preceding section.
As an example, consider the password processing information flow shown (inside shaded area) in
Figure3.23.
The flow exhibits classic transform characteristics. A password is input (incoming flow) and
transmitted to a transform center where it is compared against stored passwords.
An alarm and warning message (outgoing flow)are produced (if a match is not obtained). The
"configure" path is drawn similarly using the transform mapping. The resultant software architecture
is shown in Figure 3.25
Step 7. Refine the first-iteration architecture using design heuristics forimproved software
quality. This step for transaction mapping is identical to thecorresponding step for transform
mapping. In both design approaches, criteria suchas module independence, practicality (efficacy of
implementation and test), and maintainabilitymust be carefully considered as structural
modifications are proposed.
25
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
26
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
User model:
To build an effective user interface, “all design should begin with an understanding of the intended
users, including profiles of their age, gender, physical abilities, education, cultural or ethnic
background, motivation, goals and personality”
In addition, users can be categorized as:
Novices. No syntactic knowledge1 of the system and little semantic knowledge2 of the application
or computer usage in general.
Knowledgeable, intermittent users. Reasonable semantic knowledge of the application but
relatively low recall of syntactic information necessary to use the interface.
Knowledgeable, frequent users. Good semantic and syntactic knowledge that often leads to the
“power-user syndrome”; that is, individuals who look for shortcuts and abbreviated modes of
interaction.
Design model:
It consists of data, architectural, interface and procedural representation of the software.
Mental model
The user’s mental model (system perception) is the image of the system that end users carry in their
heads.
Implementation model:
The implementation model combines the outward manifestation of the computer based system,
coupled with all supporting information that describes interface syntax and semantics. When the
implementation model and the user’s mental model are coincident, users generally feel comfortable
with the software and use it effectively.
3.10.2 The Process
The analysis and design process for user interfaces is iterative and can be represented using a spiral
model.
The user interface analysis and design process begins at the interior of the spiral and encompasses
four distinct framework activities
(1) Interface analysis and modeling,
(2) Interface design,
(3) Interface construction, and
The goal of interface design is to define a set of interface objects and actions (and their screen
representations) that enable a user to perform all defined tasks in a manner that meets every usability
goal defined for the system.
Interface construction normally begins with the creation of a prototype that enables usage scenarios
to be evaluated.
Interface validation focuses on
(1) the ability of the interface to implement every user task correctly, to accommodate all task
variations, and to achieve all general user requirements;
(2) the degree to which the interface is easy to use and easy to learn, and
(3) the users’ acceptance of the interface as a useful tool in their work.
28
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
• What are the consequences if a user makes a mistake using the system?
• Are users experts in the subject matter that is addressed by the system?
• Do users want to know about the technology that sits behind the interface?
3.11.2 Task Analysis and Modelling:
The goal of task analysis is to answer the following questions:
• What work will the user perform in specific circumstances?
• What tasks and subtasks will be performed as the user does the work?
• What specific problem domain objects will the user manipulate as work is performed?
• What is the sequence of work tasks—the workflow?
• What is the hierarchy of tasks?
In order to answer these questions following techniques are used-
Use cases.
The use case describes the manner in which an actor interacts with a system.
The use case is developed to show how an end user performs some specific work-related task.
The use case is written in an informal style (a simple paragraph)
Task elaboration.
Task elaboration also called functional decomposition or stepwise refinement as a mechanism for
refining the processing tasks that are required for software to accomplish some desired function.
Task analysis for interface design uses an elaborative approach to assist in understanding the human
activities the user interface must accommodate.
Object elaboration.
Rather than focusing on the tasks that a user must perform, examine the use case and other
information obtained from the user and extract the physical objects that are used by the interior
designer.
These objects can be categorized into classes.
Attributes of each class are defined, and an evaluation of the actions applied to each object provide
a list of operations
Workflow analysis.
When a number of different users, each playing different roles, makes use of a user interface, it is
sometimes necessary to go beyond task analysis and object elaboration and apply workflow analysis.
This technique allows you to understand how a work process is completed when several people (and
roles) are involved.
Workflow can be represented effectively with a UML swimlane diagram (a variation on the activity
diagram).
Consider only a small part of the work process: the situation that occurs when a patient asks for a
refill. Figure 3.28 presents a swimlane diagram that indicates the tasks and decisions for each of the
three roles noted earlier.
This information may have been elicited via interview or from use cases written by each actor.
Regardless, the flow of events (shown in the figure) enables you to recognize a number of key
interface characteristics:
1. Each user implements different tasks via the interface; therefore, the look and feel of the interface
designed for the patient will be different than the one defined for pharmacists or physicians.
29
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
2. The interface design for pharmacists and physicians must accommodate access to and display of
information from secondary information sources (e.g., access to inventory for the pharmacist and
access to information about alternative medications for the physician).
3. Many of the activities noted in the swimlane diagram can be further elaborated using task analysis
and/or object elaboration (e.g., Fills prescription could imply a mail-order delivery, a visit to a
pharmacy, or a visit to a special drug distribution center).
Hierarchical representation.
A process of elaboration occurs as you begin to analyze the interface. Once workflow has been
established, a task hierarchy can be defined for each user type.
User task: Requests that a prescription be refilled
• Provide identifying information.
• Specify name.
• Specify user id.
• Specify PIN and password.
• Specify prescription number.
• Specify date refill is required.
30
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
4. Indicate how the user interprets the state of the system from information provided through the
interface.
While designing the interface the designer has to follow-
Golden rules
Model the interface
Analyze the working environment
3.12.1 Applying Interface Design Steps
The first step in any interface design is to identify all the necessary objects and corresponding
actions.
There are three types of objects
Target,
source, and
application objects
A source object (e.g., a report icon) is dragged and dropped onto a target object (e.g., a printer icon).
An application object represents application-specific data that are not directly manipulated as part
of screen interaction. For example, a mailing list is used to store names for a mailing.
3.12.2 User Interface Design Patterns
Graphical user interfaces have become so common that a wide variety of user interface design
patterns has emerged.
A design pattern is an abstraction that prescribes a design solution to a specific, well-bounded design
problem.
3.12.3 Design Issues
As the design of a user interface evolves, four common design issues almost always surface:
system response time,
user help facilities,
error information handling, and
Command labeling.
Response time:
system response time is measured from the point at which the user performs some control action.
The amount of time taken by the
System length system to respond
System response time Variation of time from
Characteristics Variability average response time
Help facilities
This is the most essential criteria for any user interface this makes the system more interactive.
The help can be online help or it can be in the form of user manual.
Error handling
Errors and warning cause the frustrations to the user.
Menu and command labelling
The typed command was once the most common mode of interaction between user and system
software and was commonly used for applications of every type.
32
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
There are number of design issues for typed command and menu labels.
Command related design issues Menu label related design issues
What form will commands take? Will every menu option have a
corresponding command?
How difficult will it be to learn and remember Are menu labels self-explanatory within the
the commands? context of the interface?
Can commands be customized or Are submenus consistent with the function
abbreviated by the user? implied by a master menu item?
What can be done if a command is
forgotten?
Application accessibility
Accessibility for users and software engineers may be physically challenged is an imperative for
ethical, legal, and business reasons.
A variety of accessibility guidelines designed for Web applications but often applicable to all types
of software—provides detailed suggestions for designing interfaces that achieve varying levels of
accessibility.
Internationalization
Software engineers and their managers invariably underestimate the effort and skills required to
create user interfaces that accommodate the needs of different locales and languages.
A variety of internationalization guidelines are available to software engineers. These guidelines
address broad design issues (e.g., screen layouts may differ in various markets) and discrete
implementation issues (e.g., different alphabets may create specialized labeling and spacing
requirements).
The Unicode standard has been developed to address the daunting challenge of managing dozens
of natural languages with hundreds of characters and symbols.
33
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
A designer should design a component in such a manner that some functionalities can added to it if
required but in doing so there should not be any change in the internal design of the component
itself.
The Liskov Substitution Principle (LSP)
“Subclasses should be substitutable for their base classes”
A component that uses a base class should continue to function properly if a class derived from the
base class is passed to the component instead.
Dependency Inversion Principle (DIP)
“Depend on abstractions. Do not depend on concretions”
The more a component depends on other concrete components rather than on abstractions such as
an interface, the more difficult it will be to extend.
The Interface Segregation Principle (ISP)
“Many client-specific interfaces are better than one general purpose interface”
There are many instances in which multiple client components use the operations provided by a
server class.
The Release Reuse Equivalency Principle (REP)
“The granule of reuse is the granule of release”.
When classes or components are designed for reuse, there is an implicit contract that is established
between the developer of the reusable entity and the people who will use it.
The developer commits to establish a release control system that supports and maintains older
versions of the entity while the users slowly upgrade to the most current version.
The Common Closure Principle (CCP)
“Classes that change together belong together.”
Classes should be packaged cohesively. That is, when classes are packaged as part of a design, they
should address the same functional or behavioral area.
When some characteristic of that area must change, it is likely that only those classes within the
package will require modification. This leads to more effective change control and release
management.
f)The Common Reuse Principle (CRP).
“Classes that aren’t reused together should not be grouped together”.
When one or more classes within a package changes, the release number of the package changes.
All other classes or packages that rely on the package that has been changed must now update to
the most recent release of the package and be tested to ensure that the new release operates without
incident.
3.14.2 Component-Level Design Guidelines
Ambler suggests the following guidelines for conducting component level design
Components: Naming conventions should be established for components that are specified as part
of the architectural model and then refined and elaborated as part of the component-level model.
Interfaces:Interfaces provide important information about communication and collaboration (as
well as helping us to achieve the OCP).
34
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
36
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
The right-hand quadrants form a matrix that indicates condition combinations and the corresponding
actions that will occur for a specific combination.
Therefore, each column of the matrix may be interpreted as a processing rule.
The following steps are applied to develop a decision table:
1. List all actions that can be associated with a specific procedure (or component).
2. List all conditions (or decisions made) during execution of the procedure.
3. Associate specific sets of conditions with specific actions, eliminating impossible combinations
of conditions; alternatively, develop every possible permutation of conditions.
4. Define rules by indicating what actions occur for a set of conditions.
37
2020-2021 Jeppiaar Institute of Technology
CS8484-Software Engineering Department of CSE