0% found this document useful (0 votes)
17 views16 pages

Unit 4 SE

The document discusses software design as a critical phase in the Software Development Life Cycle (SDLC), focusing on transforming user requirements into implementable solutions. It outlines key principles such as correctness, efficiency, modularity, and design patterns, emphasizing the importance of cohesion and coupling in software architecture. Additionally, it covers user interface design and various architectural styles, including data-centered, data flow, call and return, object-oriented, and layered architectures.

Uploaded by

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

Unit 4 SE

The document discusses software design as a critical phase in the Software Development Life Cycle (SDLC), focusing on transforming user requirements into implementable solutions. It outlines key principles such as correctness, efficiency, modularity, and design patterns, emphasizing the importance of cohesion and coupling in software architecture. Additionally, it covers user interface design and various architectural styles, including data-centered, data flow, call and return, object-oriented, and layered architectures.

Uploaded by

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

Design engineering

Software design is a mechanism to transform user requirements


into some suitable form, which helps the programmer in
software coding and implementation. It deals with representing
the client's requirement, as described in SRS (Software
Requirement Specification) document, into a form, i.e., easily
implementable using programming language.

The software design phase is the first step in SDLC (Software


Design Life Cycle), which moves the concentration from the
problem domain to the solution domain. In software design, we
consider the system to be a set of components or modules with
clearly defined behaviors & boundaries.
1.​Correctness:Software design should be correct as per
requirement.
2.​Completeness:The design should have all components like
data structures, modules, and external interfaces, etc.
3.​Efficiency:Resources should be used efficiently by the
program.
4.​Flexibility:Able to modify on changing needs.
5.​Consistency:There should not be any inconsistency in the
design.
6.​Maintainability: The design should be so simple so that it
can be easily maintainable by other designers.

Software Design Principles


Software design principles are concerned with providing means
to handle the complexity of the design process effectively.
Effectively managing the complexity will not only reduce the
effort needed for design but can also reduce the scope of
introducing errors during design.
1.​Abstraction- hide Irrelevant data ​
Abstraction simply means to hide the details to reduce
complexity and increases efficiency or quality. Different levels
of Abstraction are necessary and must be applied at each stage
of the design process so that any error that is present can be
removed to increase the efficiency of the software solution and
to refine the software solution. The solution should be
described in broadways that cover a wide range of different
things at a higher level of abstraction and a more detailed
description of a solution of software should be given at the
lower level of abstraction.

2.​Modularity- subdivide the system ​


Modularity simply means to divide the system or project into
smaller parts to reduce the complexity of the system or project.
In the same way, modularity in design means to subdivide a
system into smaller parts so that these parts can be created
independently and then use these parts in different systems to
perform different functions. It is necessary to divide the
software into components known as modules because
nowadays there are different software available like
Monolithic software that is hard to grasp for software
engineers. So, modularity is design has now become a trend
and is also important.

3.​Architecture- design a structure of something ​


Architecture simply means a technique to design a structure of
something. Architecture in designing software is a concept that
focuses on various elements and the data of the structure.
These components interact with each other and use the data of
the structure in architecture.

4.​Refinement- removes impurities ​


Refinement simply means to refine something to remove any
impurities if present and increase the quality. The refinement
concept of software design is actually a process of developing
or presenting the software or system in a detailed manner that
means to elaborate a system or software. Refinement is very
necessary to find out any error if present and then to reduce it.

5.​Pattern- a repeated form ​


The pattern simply means a repeated form or design in which
the same shape is repeated several times to form a pattern. The
pattern in the design process means the repetition of a solution
to a common recurring problem within a certain context.
6.​Information Hiding- hide the information ​
Information hiding simply means to hide the information so
that it cannot be accessed by an unwanted party. In software
design, information hiding is achieved by designing the
modules in a manner that the information gathered or
contained in one module is hidden and it cant be accessed by
any other modules.
7.​Refactoring- reconstruct something ​
Refactoring simply means to reconstruct something in such a
way that it does not affect the behavior or any other features.
Refactoring in software design means to reconstruct the design
to reduce complexity and simplify it without affecting the
behavior or its functions. Fowler has defined refactoring as
“the process of changing a software system in a way that it
won’t affect the behavior of the design and improves the
internal structure”.

8.​Functional Independence: Functional independence is


achieved by developing functions that perform only one
kind of task and do not excessively interact with other
modules. Independence is important because it makes
implementation more accessible and faster. The
independent modules are easier to maintain, test, and
reduce error propagation and can be reused in other
programs as well. Thus, functional independence is a good
design feature which ensures software quality.
It is measured using two criteria:
o​ Cohesion: It measures the relative function strength of a
module.
o​ Coupling: It measures the relative interdependence among
modules.

Coupling and Cohesion


Module Coupling
In software engineering, the coupling is the degree of
interdependence between software modules. Two modules that
are tightly coupled are strongly dependent on each other.
However, two modules that are loosely coupled are not
dependent on each other. Uncoupled modules have no
interdependence at all within them.
The various types of coupling techniques are shown in fig:

A good design is the one that has low coupling. Coupling is


measured by the number of relations between the modules. That
is, the coupling increases as the number of calls between
modules increase or the amount of shared data is large. Thus, it
can be said that a design with high coupling will have more
errors.
Cohesion: ​
Cohesion is the indication of the relationship within the module.
It is the concept of intra-module. Cohesion has many types but
usually, high cohesion is good for software.
Coupling: ​
Coupling is also the indication of the relationships between
modules. It is the concept of the Inter-module. The coupling has
also many types but usually, the low coupling is good for
software.

Now we will see the difference between Cohesion and Coupling.


the differences between cohesion and coupling are given below:
Cohesion Coupling
Cohesion is the concept of Coupling is the concept of
intra-module. inter-module.
Coupling represents the
Cohesion represents the relationships between
relationship within a module. modules.
Increasing cohesion is good Increasing coupling is
for software. avoided for software.
Cohesion represents the Coupling represents the
functional strength of independence among
modules. modules.
Highly cohesive gives the best Whereas loosely coupling
software. gives the best software.
In coupling, modules are
In cohesion, the module connected to the other
focuses on a single thing. modules.
Cohesion is created between Coupling is created between
the same module. two different modules.
There are Six types of There are Six types of
Cohesion Coupling
1. Functional Cohesion.​ 1. Common Coupling.​
2. Procedural Cohesion. ​ 2. External Coupling. ​
3. Temporal Cohesion.​ 3. Control Coupling.​
4. Sequential Cohesion.​ 4. Stamp Coupling.​
5. Layer Cohesion.​ 5. Data Coupling​
6. Communication Cohesion. 6. Content Coupling.

9.​Refactoring is the process of changing a software system in


such a way that it does not alter the function of the code yet
improves its internal structure.
1.​Objects: All entities involved in the solution design are
known as objects. For example, person, banks, company,
and users are considered as objects. Every entity has some
attributes associated with it and has some methods to
perform on the attributes.
2.​Classes: A class is a generalized description of an object.
An object is an instance of a class. A class defines all the
attributes, which an object can have and methods, which
represents the functionality of the object.
3.​Messages: Objects communicate by message passing.
Messages consist of the integrity of the target object, the
name of the requested operation, and any other action
needed to perform the function. Messages are often
implemented as procedure or function calls.
4.​Abstraction In object-oriented design, complexity is
handled using abstraction. Abstraction is the removal of the
irrelevant and the amplification of the essentials.
5.​Encapsulation: Encapsulation is also called an information
hiding concept. The data and operations are linked to a
single unit. Encapsulation not only bundles essential
information of an object together but also restricts access to
the data and methods from the outside world.
6.​Inheritance: OOD allows similar classes to stack up in a
hierarchical manner where the lower or sub-classes can
import, implement, and re-use allowed variables and
functions from their immediate superclasses.This property
of OOD is called an inheritance. This makes it easier to
define a specific class and to create generalized classes
from specific ones.
7.​Polymorphism: OOD languages provide a mechanism
where methods performing similar tasks but vary in
arguments, can be assigned the same name. This is known
as polymorphism, which allows a single interface is
performing functions for different types. Depending upon
how the service is invoked, the respective portion of the
code gets executed.

User Interface Design


The visual part of a computer application or operating system
through which a client interacts with a computer or software. It
determines how commands are given to the computer or the
program and how data is displayed on the screen.
Types of User Interface
There are two main types of User Interface:
o​ Text-Based User Interface or Command Line Interface
o​ Graphical User Interface (GUI)

Text-Based User Interface: This method relies primarily on the


keyboard. A typical example of this is UNIX.
Advantages
o​ Many and easier to customizations options.
o​ Typically capable of more important tasks.

Disadvantages
o​ Relies heavily on recall rather than recognition.
o​ Navigation is often more difficult.

Graphical User Interface (GUI): GUI relies much more


heavily on the mouse. A typical example of this type of interface
is any versions of the Windows operating systems.

Software Architecture
Introduction: The software needs the architectural design to
represents the design of software. IEEE defines architectural
design as “the process of defining a collection of hardware and
software components and their interfaces to establish the
framework for the development of a computer system.” The
software that is built for computer-based systems can exhibit
one of these many architectural styles.

Structure partitioning

1)Horizontal partitioning
Partition of the system into three parts :Input,Processing,output.

2)Vertical partitioning
Vertical partitioning suggest the control and work should be
distributed top-down in program structure.

Each style will describe a system category that consists of :
●​ A set of components (eg: a database, computational modules)
that will perform a function required by the system.
●​ The set of connectors will help in coordination,
communication, and cooperation between the components.
●​ Conditions that how components can be integrated to form the
system.
●​ Semantic models that help the designer to understand the
overall properties of the system.
The use of architectural styles is to establish a structure for all
the components of the system.
Taxonomy of Architectural styles:
1.​Data centered architectures:
●​ A data store will reside at the center of this architecture and
is accessed frequently by the other components that update,
add, delete or modify the data present within the store.
●​ The figure illustrates a typical data centered style. The client
software access a central repository. Variation of this
approach are used to transform the repository into a
blackboard when data related to client or data of interest for
the client change the notifications to client software.
●​ This means that the existing components can be changed and
new client components can be added to the architecture
without the permission or concern of other clients.
●​ Data can be passed among clients using blackboard
mechanism.

2.​Data flow architectures:


●​ This kind of architecture is used when input data to be
transformed into output data through a series of
computational manipulative components.
●​ The figure represents pipe-and-filter architecture since it uses
both pipe and filter and it has a set of components called
filters connected by pipes.
●​ Pipes are used to transmit data from one component to the
next.
●​ Each filter will work independently and is designed to take
data input of a certain form and produces data output to the
next filter of a specified form. The filters don’t require any
knowledge of the working of neighboring filters.
●​ If the data flow degenerates into a single line of transforms,
then it is termed as batch sequential. This structure accepts
the batch of data and then applies a series of sequential
components to transform it.

3.​Call and Return architectures: It is used to create a program


that is easy to scale and modify. Many sub-styles exist within
this category. Two of them are explained below.
●​ Remote procedure call architecture: This components is
used to present in a main program or sub program
architecture distributed among multiple computers on a
network.
●​ Main program or Subprogram architectures: The main
program structure decomposes into number of subprograms
or function into a control hierarchy. Main program contains
number of subprograms that can invoke other components.

4.​Object Oriented architecture: The components of a system


encapsulate data and the operations that must be applied to
manipulate the data. The coordination and communication
between the components are established via the message
passing.

5.​Layered architecture:
●​ A number of different layers are defined with each layer
performing a well-defined set of operations. Each layer will
do some operations that becomes closer to machine
instruction set progressively.
●​ At the outer layer, components will receive the user interface
operations and at the inner layers, components will perform
the operating system interfacing(communication and
coordination with OS)
●​ Intermediate layers to utility services and application
software functions.

You might also like