Software Engineering Unit 4
Software Engineering Unit 4
Software Design:-
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.
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.
For small problem, we can handle the entire problem at once but for the significant problem,
divide the problems and conquer the problem it means to divide the problem into smaller
pieces so that each piece can be captured separately.
For software design, the goal is to divide the problem into manageable pieces.
These pieces cannot be entirely independent of each other as they together form the system.
They have to cooperate and communicate to solve the problem. This communication adds
complexity.
Abstraction
Functional Abstraction
Data Abstraction
Functional Abstraction
Functional abstraction forms the basis for Function oriented design approaches.
Data Abstraction
Details of the data elements are not visible to the users of data. Data Abstraction forms the
basis for Object Oriented design approaches.
Modularity
Modularity specifies to the division of software into separate modules which are differently
named and addressed and are integrated later on in to obtain the completely functional
software. It is the only property that allows a program to be intellectually manageable. Single
large programs are difficult to understand and read due to a large number of reference
variables, control paths, global variables, etc.
Each module is a well-defined system that can be used with other applications.
Each module has single specified objectives.
Modules can be separately compiled and saved in the library.
Modules should be easier to use than to build.
Modules are simpler from outside than inside.
Advantages of Modularity
Disadvantages of Modularity
Modular design reduces the design complexity and results in easier and faster implementation
by allowing parallel development of various parts of a system. We discuss a different section
of modular design in detail in this section:
Strategy of Design
A good system design strategy is to organize the program modules in such a method
that are easy to develop and latter too, change. Structured design methods help
developers to deal with the size and complexity of programs. Analysts generate
instructions for the developers about how code should be composed and how pieces
of code should fit together to form a program.
2. Bottom-up Approach: A bottom-up approach begins with the lower details and
moves towards up the hierarchy, as shown in fig. This approach is suitable in case of
an existing system.
4. Control Coupling: Control Coupling exists among two modules if data from one
module is used to direct the structure of instruction execution in another.
5. External Coupling: External Coupling arises when two modules share an externally
imposed data format, communication protocols, or device interface. This is related to
communication to external tools and devices.
6. Common Coupling: Two modules are common coupled if they share information
through some global data items.
7. Content Coupling: Content Coupling exists among two modules if they share
code, e.g., a branch from one module into another module.
Module Cohesion
In computer programming, cohesion defines to the degree to which the elements of a
module belong together. Thus, cohesion measures the strength of relationships
between pieces of functionality within a given module. For example, in highly
cohesive systems, functionality is strongly related.
Coupling Cohesion
Coupling is also called Inter-Module Cohesion is also called Intra-Module Binding.
Binding.
Coupling shows the relationships Cohesion shows the relationship within the module.
between modules.
Coupling shows the Cohesion shows the module's
relative independence between the relative functional strength.
modules.
While creating, you should aim for low While creating you should aim for high cohesion,
coupling, i.e., dependency among i.e., a cohesive component/ module focuses on a
modules should be less. single function (i.e., single-mindedness) with little
interaction with other modules of the system.
In coupling, modules are linked to the In cohesion, the module focuses on a single thing.
other modules.
Architectural Design:-
Requirements of the software should be transformed into an architecture that describes the
-level structure and identifies its components. This is accomplished through
architectural design (also called system design), which acts as a prelimin
defining a collection of hardware and software components and their interfaces to establish
This framework is established by
examining the software requirements document and designing a model for providing
implementation details. These details are used to specify the components of the system along
with their inputs, outputs, functions, and the interaction between them.
1. It defines an abstraction level at which the designers can specify the functional and
performance behaviour of the system.
2. It acts as a guideline for enhancing the system (when ever required) by describing those
features of the system that can be modified easily without affecting the system integrity.
4. It develops and documents top-level design for the external and internal interfaces.
6. It defines and documents preliminary test requirements and the schedule for software
integration.
Though the architectural design is the responsibility of developers, some other people like
user representatives, systems engineers, hardware engineers, and operations personnel are
also involved.
Dynamic model: Specifies the behavioral aspect of the software architecture and indicates
how the structure or system configuration changes as the function changes due to change in
the external environment
Process model: Focuses on the design of the business or technical process, which must be
implemented in the system
The architectural design process results in an Architectural Design Document (ADD). This
document consists of a number of graphical representations thatcomprises software models
along with associated descriptive text. The softwaremodels include static model, interface
model, relationship model, and dynamic processmodel. They show how the system is
organized into a process at run-time.
Architectural design document gives the developers a solution to the problem stated in the
Software Requirements Specification (SRS). Note that it considers only those requirements in
detail that affect the program structure. In addition to ADD, other outputs of the architectural
design are listed below.
Various reports including audit report, progress report, and configuration status
accounts report
Various plans for detailed design phase, which include the following
Software verification and validation plan
Software configuration management plan
Software quality assurance plan
Software project management plan.
Architectural Styles:-
Architectural styles define a group of interlinked systems that share structural and semantic
properties. In short, the objective of using architectural styles is to establish a structure for all
the components present in a system. If an existing architecture is to be re-engineered, then
imposition of an architectural style results in fundamental changes in the structure of the
system.
By applying certain constraints on the design space, we can make different style-specific
analysis from an architectural style. In addition, if conventional structures are used for an
architectural style, the other stakeholders can easily understand the organization of the
system.
A computer-based system (software is part of this system) exhibits one of the many available
architectural styles. Every architectural style describes a system category that includes the
following.
Computational components such as clients, server, filter, and database to execute the
desired system function
A set of connectors such as procedure call, events broadcast, database protocols, and
pipes to provide communication among the computational components
Constraints to define integration of components to form a system
A semantic model, which enable the software designer to identify the characteristics
of the system as a whole by studying the characteristics of its components.
Advantages of Architectural Design in Software Engineering:-
Architectural design is a creative process so the process differs depending on the type of
system being developed. However, a number of common decisions span all design processes
and these decisions affect the non-functional characteristics of the system:
Systems in the same domain often have similar architectures that reflect domain concepts.
Application product lines are built around a core architecture with variants that satisfy
particular customer requirements. The architecture of a system may be designed around one
of more architectural patterns/styles, which capture the essence of an architecture and can be
instantiated in different ways.
The particular architectural style should depend on the non-functional system requirements:
Procedural Design:-
Procedural design is used to model programs that have an obvious flow of data from
input to output.
It represents the architecture of a program as a set of interacting processes that pass
data from one to another.
Procedural design is also called component design. It is completely based on process
and control specifications.
component design.
Component design is usually done after user interface design.
The component-level design depicts the software at a level of abstraction that is very
close to the code.
At the component level, the software engineer must represent data structures,
interfaces, and algorithms in sufficient detail to guide the generation of programming
language source code.
The step occurs after the data and program structures have been established, i.e. after
architectural design. Procedural details can be represented in different ways:
1. Graphical Design Notation: The most widely used notation is the flowchart. Some
notation used in flowcharts are
2. Tabular Design Notation: (i) Decision tables provide a notation that translates actions and
conditions (described a processing narrative) into a tabular form.
(ii) The upper left-hard section contains a list of all conditions. The lower left-hand section
lists all actions that are possible based on the conditions. The right-hand sections form a
matrix that indicates condition combinations and the corresponding actions that will occur for
a specific combination.
3. Program Design Language: It is a method designing and documenting methods and
procedures in software. It is related to pseudocode, but unlike pseudocode, it is written in
plain language without any terms that could suggest the use of any programming language or
library.
Design Documentation :-
The design phase of software development deals with transforming the customer
requirements as described in the SRS documents into a form implementable using a
programming language. The software design process can be divided into the following three
levels of phases design:
Interface Design
Architectural Design
Detailed Design