7. 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.
Following are the principles of Software Design
1. Problem Partitioning
2. Abstraction
3. Top-down and bottom-up strategies
4. Modularity
8. Problem Partitioning
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.
Benefits of Problem Partitioning
1.Software is easy to understand
2.Software becomes simple
3.Software is easy to test
4.Software is easy to modify
5.Software is easy to maintain
6.Software is easy to expand
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.
Note: As the number of partition increases = Cost of partition and complexity increases
9. Types of abstraction :
1. Procedural Abstraction :A named sequence of instructions that has a specific &limited function
Eg: Word OPEN for a door
2. Data Abstraction :A named collection of data that describes a data object.
Data abstraction for door would be a set of attributest hat describes the door(e.g. door type, swing
direction, weight, dimension)
3. Control Abstraction : Control abstraction implies a program control mechanism without
specifying internal details .
Eg: Door opening mechanism
Functional abstraction forms the basis of structural design methodology, while data abstraction
forms the basis of object-oriented methodology
10. Top down and bottom up design planning - According to this principle a big problem divided in two little parts which
is called modules and solved these modules one by one individually so that no one module can effected each other.
We have two types of approaches. The top down approach goes from high level to the lower level. On the other side
the bottom up approach goes the opposite that mean it goes lower level to top level.
•Top down design planning - When planning of system starts from that target which system wants to get then that
approach is called top down design planning.When we see the desired task is not easy for achieving then this task
divided in parts and these parts is called sub task. These sub tasks have some quality which is:
• Size of problem will be small
• Reduce the level of difficulty
• Easy to achieve
•If a task is difficult then we may divide it low difficulty and easily getable subtasks. Thus the process of division of
various tasks in to sub tasks is to make simple and easy which can be used or solved easily. Many types of module
based on this approach but this approach is useful only those that case where the target is mentioned clearly.
•Benefits
• This method of program development is same to human approach of problem solving .In this approach first
we decide the goal and after that we takes the steps to achieve the targets.
• The programmer became aware about the goal at every level.
• It reduces the level of confusion.
• It gives a proper process with the help of this problem solved easily and quickly.
11. Bottom up design planning - To get the big goal for the system, this approach is used. It
started from the lower level and at the end it reached the top level. In this approach individual
modules are combined with each other so that a big module can be built which is the target of
this system. A good idea is must require for the success of this approach. Until we have not good
idea about the operation need at the higher level then we cannot decide what operation support
at this time.
Advantages improves system features and functions
12. The module simply means the software components that are been created by dividing the
software. The software is divided into various components that work together to form a single
functioning item but sometimes they can perform as a complete function if not connected with
each other. This process of creating software modules is known as Modularity in software
engineering.
Advantages of Modularity
There are several 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.
13. Disadvantages of Modularity
There are several 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
14. Modular Decomposability –
Decomposability simply means to break down something into smaller pieces. Modular
decomposability means to break down the problem into different sub-problems in a systematic
manner. Solving a large problem is difficult sometimes, so the decomposition helps in reducing
the complexity of the problem, and sub-problems created can be solved independently. This helps
in achieving the basic principle of modularity.
Modular Composability –
Composability simply means the ability to combine modules that are created. It’s actually the
principle of system design that deals with the way in which two or more components are related
or connected to each other. Modular composability means to assemble the modules into a new
system that means to connect the combine the components into a new system.
15. Modular Understandability –
Understandability simply means the capability of being understood, quality of comprehensible.
Modular understandability means to make it easier for the user to understand each module so that
it is very easy to develop software and change it as per requirement. Sometimes it’s not easy to
understand the process models because of its complexity and its large size in structure. Using
modularity understandability, it becomes easier to understand the problem in an efficient way
without any issue.
Modular Continuity –
Continuity simply means unbroken or consistent or uninterrupted connection for a long period of
time without any change or being stopped. Modular continuity means making changes to the
system requirements that will cause changes in the modules individually without causing any effect
or change in the overall system or software.
Modular Protection –
Protection simply means to keep something safe from any harms, to protect against any
unpleasant means or damage. Modular protection means to keep safe the other modules from the
abnormal condition occurring in a particular module at run time. The abnormal condition can be an
error or failure also known as run-time errors. The side effects of these errors are constrained
within the module.
16. Structured design is a conceptualization of problem into several well-organized elements of
solution. It is basically concerned with the solution design. Benefit of structured design is, it gives
better understanding of how the problem is being solved. Structured design also makes it simpler
for designer to concentrate on the problem more accurately.
Structured design is mostly based on ‘divide and conquer’ strategy where a problem is broken into
several small problems and each small problem is individually solved until the whole problem is
solved.
The small pieces of problem are solved by means of solution modules. Structured design emphasis
that these modules be well organized in order to achieve precise solution.
These modules are arranged in hierarchy. They communicate with each other. A good structured
design always follows some rules for communication among multiple modules, namely -
Cohesion - grouping of all functionally related elements.
Coupling - communication between different modules.
A good structured design has high cohesion and low coupling arrangements.
17. Function Oriented Design
In function-oriented design, the system is comprised of many smaller sub-
systems known as functions. These functions are capable of performing
significant task in the system. The system is considered as top view of all
functions.
Function oriented design inherits some properties of structured design where
divide and conquer methodology is used.
This design mechanism divides the whole system into smaller functions, which
provides means of abstraction by concealing the information and their
operation.. These functional modules can share information among
themselves by means of information passing and using information available
globally.
Another characteristic of functions is that when a program calls a function, the
function changes the state of the program, which sometimes is not acceptable
by other modules. Function oriented design works well where the system state
does not matter and program/functions work on input rather than on a state.
18. Object Oriented Design
Object oriented design works around the entities and their characteristics instead of
functions involved in the software system. This design strategies focuses on entities and its
characteristics. The whole concept of software solution revolves around the engaged
entities.
Let us see the important concepts of Object Oriented Design:
•Objects - All entities involved in the solution design are known as objects. For example,
person, banks, company and customers are treated as objects. Every entity has some
attributes associated to it and has some methods to perform on the attributes.
•Classes - A class is a generalized description of an object. An object is an instance of a
class. Class defines all the attributes, which an object can have and methods, which defines
the functionality of the object.
•In the solution design, attributes are stored as variables and functionalities are defined by
means of methods or procedures.
19. •Encapsulation - In OOD, the attributes (data variables) and methods (operation on the
data) are bundled together is called encapsulation. Encapsulation not only bundles
important information of an object together, but also restricts access of the data and
methods from the outside world. This is called information hiding.
•Inheritance - OOD allows similar classes to stack up in hierarchical manner where the
lower or sub-classes can import, implement and re-use allowed variables and methods
from their immediate super classes. This property of OOD is known as inheritance. This
makes it easier to define specific class and to create generalized classes from specific
ones.
•Polymorphism - OOD languages provide a mechanism where methods performing
similar tasks but vary in arguments, can be assigned same name. This is called
polymorphism, which allows a single interface performing tasks for different types.
Depending upon how the function is invoked, respective portion of the code gets executed.