CHAPTER-2
DESIGN CONCEPTS
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.
Objectives of Software Design
Following are the purposes of Software design:
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 & Concepts
Once the requirements document for the software to be developed is available, the software
design phase begins. While the requirement specification activity deals entirely with the
problem domain, design is the first phase of transforming the problem into a solution. In the
design phase, the customer and business requirements and technical considerations all come
together to formulate a product or a system.
The design process comprises a set of principles, concepts and practices, which allow a
software engineer to model the system or product that is to be built. This model, known as
design model, is assessed for quality and reviewed before a code is generated and tests are
conducted. The design model provides details about software data structures, architecture,
interfaces and components which are required to implement the system. This chapter
discusses the design elements that are required to develop a software design model. It also
discusses the design patterns and various software design notations used to represent a
software design.
Software Design Concepts
Every software process is characterized by basic concepts along with certain practices or
methods. Methods represent the manner through which the concepts are applied. As new
technology replaces older technology, many changes occur in the methods that are used to
apply the concepts for the development of software. However, the fundamental concepts
underlining the software design process remain the same, some of which are described here.
Abstraction
Abstraction refers to a powerful design tool, which allows software designers to consider
components at an abstract level, while neglecting the implementation details of the
components.
The concept of abstraction can be used in two ways: as a process and as an entity. As
a process, it refers to a mechanism of hiding irrelevant details and representing only the
essential features of an item so that one can focus on important things at a time. As
an entity, it refers to a model or view of an item.
There are three commonly used abstraction mechanisms in software design, namely,
functional abstraction, data abstraction and control abstraction. All these mechanisms allow
us to control the complexity of the design process by proceeding from the abstract design
model to concrete design model in a systematic manner.
Functional abstraction: This involves the use of parameterized subprograms.
Functional abstraction can be generalized as collections of subprograms referred to as
‘groups’. Within these groups there exist routines which may be visible or hidden.
Visible routines can be used within the containing groups as well as within other groups,
whereas hidden routines are hidden from other groups and can be used within the
containing group only.
Data abstraction: This involves specifying data that describes a data object. For
example, the data object window encompasses a set of attributes (window type, window
dimension) that describe the window object clearly. In this abstraction mechanism,
representation and manipulation details are ignored.
Control abstraction: This states the desired effect, without stating the exact mechanism
of control. For example, if and while statements in programming languages (like C and
C++) are abstractions of machine code implementations, which involve conditional
instructions. In the architectural design level, this abstraction mechanism permits
specifications of sequential subprogram and exception handlers without the concern for
exact details of implementation.
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
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.
Abstraction
An 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.
Here, there are two common abstraction mechanisms
1. Functional Abstraction
2. Data Abstraction
Functional Abstraction
i. A module is specified by the method it performs.
ii. 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.
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.
The desirable properties of a modular system are:
o Each module is a well-defined system that can be used with other applications.
o Each module has single specified objectives.
o Modules can be separately compiled and saved in the library.
o Modules should be easier to use than to build.
o Modules are simpler from outside than inside.
Advantages and Disadvantages of Modularity
In this topic, we will discuss various advantage and disadvantage of Modularity.
There are several advantages of Modularity
o It allows large programs to be written by several or different people
o It encourages the creation of commonly used routines to be placed in the library and
used by other programs.
o It simplifies the overlay procedure of loading a large program into main storage.
o It provides more checkpoints to measure progress.
o It provides a framework for complete testing, more accessible to test
o It produced the well designed and more readable program.
Disadvantages of Modularity
There are several disadvantages of Modularity
o Execution time maybe, but not certainly, longer
o Storage size perhaps, but is not certainly, increased
o Compilation and loading time may be longer
o Inter-module communication problems may be increased
o More linkage required, run-time may be longer, more source lines must be written,
and more documentation has to be done
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.
To design a system, there are two possible approaches:
1. Top-down Approach
2. Bottom-up Approach
1. Top-down Approach: This approach starts with the identification of the main components
and then decomposing them into their more detailed sub-components.
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.
The Design Model
Introduction to Design Modeling in Software Engineering
Design modeling in software engineering represents the features of the software that helps
engineer to develop it effectively, the architecture, the user interface, and the component level
detail. Design modeling provides a variety of different views of the system like architecture
plan for home or building. Different methods like data-driven, pattern-driven, or object-
oriented methods are used for constructing the design model. All these methods use set of
design principles for designing a model.
Working of Design Modeling in Software Engineering
Designing a model is an important phase and is a multi-process that represent the data
structure, program structure, interface characteristic, and procedural details. It is mainly
classified into four categories – Data design, architectural design, interface design, and
component-level design.
Data design: It represents the data objects and their interrelationship in an entity-
relationship diagram. Entity-relationship consists of information required for each
entity or data objects as well as it shows the relationship between these objects. It
shows the structure of the data in terms of the tables. It shows three type of
relationship – One to one, one to many, and many to many. In one to one relation, one
entity is connected to another entity. In one many relation, one Entity is connected to
more than one entity. un many to many relations one entity is connected to more than
one entity as well as other entity also connected with first entity using more than one
entity.
Architectural design: It defines the relationship between major structural elements of
the software. It is about decomposing the system into interacting components. It is
expressed as a block diagram defining an overview of the system structure – features
of the components and how these components communicate with each other to share
data. It defines the structure and properties of the component that are involved in the
system and also the inter-relationship among these components.
User Interfaces design: It represents how the Software communicates with the user
i.e. the behavior of the system. It refers to the product where user interact with
controls or displays of the product. For example, Military, vehicles, aircraft, audio
equipment, computer peripherals are the areas where user interface design is
implemented. UI design becomes efficient only after performing usability testing.
This is done to test what works and what does not work as expected. Only after
making the repair, the product is said to have an optimized interface.
Component level design: It transforms the structural elements of the software
architecture into a procedural description of software components. It is a perfect way
to share a large amount of data. Components need not be concerned with how data is
managed at a centralized level i.e. components need not worry about issues like
backup and security of the data.
Principles of Design Model
Design must be traceable to the analysis model:
Analysis model represents the information, functions, and behavior of the system. Design
model translates all these things into architecture – a set of subsystems that implement major
functions and a set of component kevel design that are the realization of Analysis classes.
This implies that design model must be traceable to the analysis model.
Always consider architecture of the system to be built:
Software architecture is the skeleton of the system to be built. It affects interfaces, data
structures, behavior, program control flow, the manner in which testing is conducted,
maintainability of the resultant system, and much more.
Focus on the design of the data:
Data design encompasses the manner in which the data objects are realized within the design.
It helps to simplify the program flow, makes the design and implementation of the software
components easier, and makes overall processing more efficient.
User interfaces should consider the user first:
The user interface is the main thing of any software. No matter how good its internal
functions are or how well designed its architecture is but if the user interface is poor and end-
users don’t feel ease to handle the software then it leads to the opinion that the software is
bad.
Software Architecture Definition
Software architecture is, simply, the organization of a system. This organization includes all
components, how they interact with each other, the environment in which they operate, and
the principles used to design the software. In many cases, it can also include the evolution of
the software into the future.
Software architecture is designed with a specific mission or missions in mind. That mission
has to be accomplished without hindering the missions of other tools or devices. The
behavior and structure of the software impact significant decisions, so they need to be
appropriately rendered and built for the best possible results.
Software Architecture In Software Engineering
Software architecture in software engineering helps to expose the structure of a system while
hiding some implementation details. Architecture focuses on relationships and how the
elements and components interact with each other, as does software engineering.
In fact, software architecture and software engineering often overlap. They are combined
because many of the same rules govern both practices. The different sometimes comes when
decisions are focused on software engineering and the software architecture follows.
It is important to note that all software architecture is engineering, but not all engineering is
software architecture. The software architect is able to distinguish between what is just details
in the software engineering and what is important to that internal structure.
Currently, software architecture looms over software engineering, determining the direction
of the designing and building of complex systems.
Software Architecture
Software architecture design tools are used to build software architecture without having
major flaws or problems. When using proper tools, one is able to reduce the chances of bugs
in the implementation of the software or flaws in the design that will have impacts later on in
development or when the software is used heavily.
Software architecture design tools help to build software that doesn’t have security issues.
This is key because there are software risks in all areas of the software development process.
When teams avoid software flaws or bugs, they are able to move forward with confidence.
However, since this isn’t always possible, software architecture design tools also need to
have the ability to find flaws during the creation of software and correct them efficiently.
When using software architecture design tools that can identify flaws, you will have the
ability to analyze the fundamental software design, assess the chance of an attack, figure out
potential threat elements, and identify any weaknesses or gaps in existing security.
Tools like those from CAST are cost effective because they can identify AND fix design
flaws throughout the entire software architecture design process – including at the start when
it is best to find and fix problems. Or tools perform architecture risk analysis, threat
modeling, and more to help find, fix, and redesign software architecture.
Organizations that fail to use the proper software architecture design tools might be surprised
at the problems that are able to pop up later – sometimes fatally. There are faults in software
architecture that can go unnoticed for some time, but eventually, they will emerge. The
question is how much risk and how much work was put into place before it was noticed? This
can impact bottom lines and hurt safety and reputations of companies.
“Even the best architecture, most perfectly suited for the job, will be essentially useless if the
people who need to use it do not know what it is, cannot understand it well enough to apply
it, or (worst of all) misunderstand it and apply it incorrectly. All of the effort, analysis, hard
work, and insightful design on the part of the architecture team will have been wasted.”
Documenting Software Architectures: Views and Beyond, Paul Clements, et. al
To prevent application decay, delivery teams must put in place a software intelligence
platform. CAST structural analysis engine, the Application Intelligence Platform, look at how
software components interact then creates a visual representation to provides insight to
developers or new team members that help them better understand, support, and continue to
develop the application.
Interactive exploration - An end-user application to graphically display and explore the
structure of an application and its code interdependencies, according to the information
gathered during code analysis and stored in the AIP Knowledgebase
Change Simulation - Impact analysis capabilities to simulate the impact of a modification to
an object
Automated Documentation - HTML report feature to create technical documentation
Highlight database model and ensure adherence between back-end and database layers
Search any component and position it on a current graphical view, on a transaction
View source code and all details about any application component
Extract high-level software architectures showing all the technologies, frameworks, and
databases in the application.
Architecture Styles:
The architectural styles that are used while designing the software as follow:
1) Data centred architecture
2) Data flow architectures
3) Call and return architectures
4) Object oriented architectures
5) Layered architectures
1) Data centred architecture:
The data store in the file or database is occupying at the center of the
architecture.
Store data is access continuously by the other components like an update,
delete, add, modify from the data store.
Pass data between clients using the blackboard mechanism.
The processes are independently executed by the client components.
2) Data flow architecture:
The architecture is applied when the input data is converted into a series of
manipulative components in to output data.
A pipe and filter pattern is a set of components called as filters.
Filters are connected through pipes and transfer data from one component to
the next component.
The flow of data degenerates into a single line of transform then it is known as
batch sequential.
3) Call and return architecture:
This architecture style allows to achieve a program structure which is easy to modify.
Following are the sub styles exist in this category:
1) Main program or subprogram architecture
The program is divided into smaller pieces hierarchically.
The main program invokes many of program components in the
hierarchy that program components are divided into subprogram.
2) Remote procedure call architecture
The main program or subprogram components are distributed in
network of multiple computers.
The main aims is to increase the performance.
4)Object-oriented architectures:
This architecture is the latest version of call and return architecture.
It consists of the bundling of data and methods.
5)Layered architectures:
The different layers are defined in the architecture. It consists of outer and inner layer.
The components of outer layer manage the user interface operations.
Components execute the operating system interfacing at the inner layer.
The inner layers are application layer, utility layer and the core layer.
In many cases, it is possible and the alternate architectural style can be designed and
evaluated.
Architectural Genres:
Architecture genre is used to define the architectural approach for the build of any structure.
considering the software programming areas, the architectural designs point to a specific
category, with a number of subcategories for each. Some general styles that are taken into
consideration with the genre of buildings are houses, apartment buildings etc. The
architectural genres for software-based systems as suggested by grady booch are as follows:
Artificial intelligence
Commercial and non profit
Communication
Content authoring
Content authoring
Device
Entertainment and sports
Financial
Games
Government
Industrial
Legal
Medical
Military
Operating systems
Scientific
Transportation.