What is Software Design concept
What is Software Design concept
The software design phase is the first step in the SDLC (Software
Development Life Cycle) that shifts the focus from the problem
domain to the solution domain. In software design, the system is
viewed as a collection of components or modules with clearly defined
behaviors and bounds.
Refactoring
Refactoring is the process of reorganizing code without affecting its
original functionality. Refactoring aims to improve internal code by
making modest changes that do not affect the code's exterior
behavior. Computer programmers and software developers refactor
code to improve the software's design, structure, and
implementation. As a result, Refactoring increases code readability
while decreasing complications. Refactoring can also assist software
engineers in locating faults or vulnerabilities in their code.
Refactoring
Conclusion
Software design is the process that converts user requirements
into a suitable form for the programmer to employ in software
coding and implementation.
It is concerned with converting the client's requirements as
defined in the SRS (Software Requirement
Specification) document into a form that can be easily
implemented using a programming language.
In the SDLC (Software Design Life Cycle), the focus shifts from
the problem domain to the solution domain during the software
design phase. It attempts to specify how to meet the
requirements outlined in the SRS.
The objectives of the software design process are correctness,
completeness, efficiency, flexibility, consistency, and
maintainability.
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.
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.
Cohesion is an ordinal type of measurement and is generally
described as "high cohesion" or "low cohesion."
Types of Modules Cohesion
1. Functional Cohesion: Functional Cohesion is said to exist if the different
elements of a module, cooperate to achieve a single function.
2. Sequential Cohesion: A module is said to possess sequential cohesion if
the element of a module form the components of the sequence, where
the output from one component of the sequence is input to the next.
3. Communicational Cohesion: A module is said to have communicational
cohesion, if all tasks of the module refer to or update the same data
structure, e.g., the set of functions defined on an array or a stack.
4. Procedural Cohesion: A module is said to be procedural cohesion if the set
of purpose of the module are all parts of a procedure in which particular
sequence of steps has to be carried out for achieving a goal, e.g., the
algorithm for decoding a message.
5. Temporal Cohesion: When a module includes functions that are
associated by the fact that all the methods must be executed in the same
time, the module is said to exhibit temporal cohesion.
6. Logical Cohesion: A module is said to be logically cohesive if all the
elements of the module perform a similar operation. For example Error
handling, data input and data output, etc.
7. Coincidental Cohesion: A module is said to have coincidental cohesion if it
performs a set of tasks that are associated with each other very loosely, if
at all.