8 Flashcards
is a mechanism to transform user requirements into some suitable
form, which helps the programmer in software coding and implementation.
Software Design
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.
Software Design
6 Objectives of Software Design
Correctness
Completeness
Efficiency
Flexibility
Consistency
Maintainability
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.
Software Design Principles
These are recommendations that help you write code that is clear, manageable, and
scalable. These principles give a foundation for developing software systems that are
both robust and responsive to change.
Software Design Principles
4 Software Design Principles
Problem Partitioning
Abstraction
Modularity
Top Down & Bottom up Strategy
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.
Problem Partitioning
- For software design, the goal is to divide the problem into manageable pieces.
Problem Partitioning
6 Benefits of Problem Partitioning
- Software is easy to understand
- Software becomes simple
- Software is easy to test
- Software is easy to modify
- Software is easy to maintain
- Software is easy to expand
A module is specified by the method it performs.
Functional Abstraction
is a tool that enables a designer to consider a component at an
abstract level without bothering about the internal details of the implementation.
Abstraction can be used for existing element as well as the component being
designed.
Abstraction
two common abstraction mechanisms:
Functional Abstraction
Data Abstraction
The details of the algorithm to accomplish the functions are not visible to the
user of the function.
Functional Abstraction
forms the basis for Function oriented design approaches.
Functional Abstraction
Details of the data elements are not visible to the users of data.
Data Abstraction
forms the basis for Object Oriented design approaches.
Data Abstraction
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.
Modularity
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.
Modularity
Advantages of Modularity
- It allows large programs to be written by several or different people
- It encourages the creation of commonly used routines to be placed in the library and
used by other programs. - It simplifies the overlay procedure of loading a large program into main storage.
- It provides more checkpoints to measure progress.
- It provides a framework for complete testing, more accessible to test
- It produced the well designed and more readable program.
Disadvantages of Modularity
- Execution time maybe, but not certainly, longer
- Storage size perhaps, but is not certainly, increased
- Compilation and loading time may be longer
- Inter-module communication problems may be increased
- More linkage required, run-time may be longer, more source lines must be written,
and more documentation has to be done
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.
Functional Independence:
It measures the relative function strength of a module.
Cohesion
It is measured using two criteria:
Cohesion:
Coupling:
It measures the relative interdependence among modules.
Coupling:
The fundamental of Information hiding suggests that modules
can be characterized by the design decisions that protect from the others, i.e., In other
words, modules should be specified that data include within a module is inaccessible to
other modules that do not need for such information.
Information hiding
To design a system, there are two possible approaches:
Top-down Approach
Bottom-up Approach
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.
Strategy of Design
SOLID Principles
(Single Responsibility, Open-Closed, Liskov Substitution, Interface
Segregation, Dependency Inversion)
Additional Software Design Principles
- SOLID Principles (Single Responsibility, Open-Closed, Liskov Substitution, Interface
Segregation, Dependency Inversion) - DRY (Don’t Repeat Yourself)
- Encapsulation Principle
- Principle of Least Astonishment (PoLA)
- You Aren’t Gonna Need It (YAGNI)
- Keep It Simple, Stupid (KISS)
DRY
(Don’t Repeat Yourself)
(PoLA)
Principle of Least Astonishment (
(YAGNI)
You Aren’t Gonna Need It
Different Designs in Software
Architectural Pattern
Design Pattern