software engineering notes3_Module3
software engineering notes3_Module3
Design Concepts
Design Principles
Architecture Design
Component Level Design
System Level Design
User Interface Design
Software Design
It is the process to transform the user requirements into some suitable form, which helps the
programmer in software coding and implementation.
During the software design phase, the design document is produced, based on the customer
requirements as documented in the SRS document.
Hence the aim of this phase is to transform the SRS document into the design document.
The following items are designed and documented during the design phase:
Correctness:
A good design should be correct i.e. it should correctly implement all the functionalities of the
system.
Efficiency:
A good software design should address the resources, time, and cost optimization issues.
Flexibility:
A good software design should have the ability to adapt and accommodate changes easily. It
includes designing the software in a way, that allows for modifications, enhancements, and
scalability without requiring significant rework or causing major disruptions to the existing
functionality.
Understandability:
A good design should be easily understandable, for which it should be modular and all the
modules are arranged in layers.
Completeness:
The design should have all the components like data structures, modules, and external interfaces,
etc.
Maintainability:
A good software design aims to create a system that is easy to understand, modify, and maintain
over time. Maintainability in software Design also enables developers to fix bugs, enhance
features, and adapt the software to changing requirements without excessive effort or introducing
new issues.
Abstraction
Abstraction simply means to hide the details to reduce complexity and increases
efficiency or quality. Different levels of Abstraction are necessary and must be applied at
each stage of the design process so that any error that is present can be removed to
increase the efficiency of the software solution and to refine the software solution.
Modularity
Modularity simply means dividing the system or project into smaller parts to reduce the
complexity of the system or project. It is necessary to divide the software into
components known as modules. In the same way, modularity in design means
subdividing a system into smaller parts so that these parts can be created independently
and then uses these parts in different systems to perform different functions.
Architecture
Architecture simply means a technique to design a structure of something. Architecture in
designing software is a concept that focuses on various elements and the data of the
structure. These components interact with each other and use the data of the structure in
architecture.
Refinement-
Refinement simply means to refine something to remove any impurities if present and
increase the quality. The refinement concept of software design is actually a process of
developing or presenting the software or system in a detailed manner that means to
elaborate a system or software. Refinement is very necessary to find out any error if
present and then to reduce it.
Pattern
The pattern simply means a repeated form or design in which the same shape is repeated
several times to form a pattern. The pattern in the design process means the repetition of
a solution to a common recurring problem within a certain context.
InformationHiding
Information hiding simply means to hide the information so that it cannot be accessed by
an unwanted party. In software design, information hiding is achieved by designing the
modules in a manner that the information gathered or contained in one module is hidden
and can’t be accessed by any other modules.
Refactoring
Refactoring simply means reconstructing something in such a way that it does not affect
the behavior of any other features. Refactoring in software design means reconstructing
the design to reduce complexity and simplify it without affecting the behavior or its
functions.
Principles of Software Design
Principles of Software Design
1. Should not suffer from “Tunnel Vision” –
While designing the process, it should not suffer from “tunnel vision” which means that
is should not only focus on completing or achieving the aim but on other effects also.
2. Traceable to analysis model –
The design process should be traceable to the analysis model which means it should
satisfy all the requirements that software requires to develop a high-quality product.
3. Should not “Reinvent the Wheel” –
The design process should not reinvent the wheel that means it should not waste time or
efforts in creating things that already exist. Due to this, the overall development will get
increased.
4. Minimize Intellectual distance –
The design process should reduce the gap between real-world problems and software
solutions for that problem meaning it should simply minimize intellectual distance.
5. Exhibit uniformity and integration –
The design should display uniformity which means it should be uniform throughout the
process without any change. Integration means it should mix or combine all parts of
software i.e. subsystems into one system.
6. Accommodate change –
The software should be designed in such a way that it accommodates the change
implying that the software should adjust to the change that is required to be done as per
the user’s need.
7. Degrade gently –
The software should be designed in such a way that it degrades gracefully which means it
should work properly even if an error occurs during the execution.
8. Assessed or quality –
The design should be assessed or evaluated for the quality meaning that during the
evaluation, the quality of the design needs to be checked and focused on.
9. Review to discover errors –
The design should be reviewed which means that the overall evaluation should be done to
check if there is any error present or if it can be minimized.
10. Design is not coding and coding is not design –
Design means describing the logic of the program to solve any problem and coding is a
type of language that is used for the implementation of a design.
Architecture Design in Software Engineering
Architectural design is of crucial importance in software engineering during
which the essential requirements like reliability, cost, and performance are
dealt with.
Requirements of the software should be transformed into an architecture that
describes the software’s top-level structure and identifies its components.
This is accomplished through architectural design (also called system
design), which acts as a preliminary ‘blueprint’ from which software can be
developed.
IEEE defines architectural design as ‘the process of defining a collection of
hardware and software components and their interfaces to establish the
framework for the development of a computer system.’
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.
Functions:
1. It defines an abstraction level at which the designers can specify the
functional and performance behavior of the system.
2. It acts as a guideline for enhancing the system (whenever required) by
describing those features of the system that can be modified easily without
affecting the system integrity.
3. It evaluates all top-level designs.
4. It develops and documents top-level design for the external and internal
interfaces.
5. It develops preliminary versions of user documentation.
6. It defines and documents preliminary test requirements and the schedule for
software integration.
7. It uses data-flow diagrams
8. It uses architectural patterns and architectural styles.
Architectural Design Representation
Architectural design can be represented using the following models.
In addition to ADD, other outputs of the architectural design are listed below.
A set of components (eg: a database, computational modules) that will perform a function
required by the system.
The set of connectors will help in coordination, communication, and cooperation between
the components.
Conditions that how components can be integrated to form the system.
Semantic models that help the designer to understand the overall properties of the system.
A data store will reside at the center of this architecture and is accessed frequently by the
other components that update, add, delete or modify the data present within the store.
The figure illustrates a typical data centered style. The client software access a central
repository. Variation of this approach is used to transform the repository into a
blackboard when data related to client or data of interest for the client change the
notifications to client software.
This data-centered architecture will promote integrability. This means that the existing
components can be changed and new client components can be added to the architecture
without the permission or concern of other clients.
Data can be passed among clients using blackboard mechanism.
This kind of architecture is used when input data is transformed into output data through
a series of computational manipulative components.
The figure represents pipe-and-filter architecture since it uses both pipe and filter and it
has a set of components called filters connected by lines.
Pipes are used to transmitting data from one component to the next.
Each filter will work independently and is designed to take data input of a certain form
and produces data output to the next filter of a specified form. The filters don’t require
any knowledge of the working of neighboring filters.
If the data flow degenerates into a single line of transforms, then it is termed as batch
sequential. This structure accepts the batch of data and then applies a series of sequential
components to transform it.
It is used to create a program that is easy to scale and modify. Many sub-styles exist within this category.
Two of them are explained below.
Remote procedure call architecture: This components is used to present in a main program or
sub program architecture distributed among multiple computers on a network.
Main program or Subprogram architectures: The main program structure decomposes into
number of subprograms or function into a control hierarchy. Main program contains number of
subprograms that can invoke other components.
4] Object oriented architecture
The components of a system encapsulate data and the operations that must be applied to manipulate the
data. The coordination and communication between the components are established via the message
passing.
A number of different layers are defined with each layer performing a well-defined set of
operations. Each layer will do some operations that become closer to machine instruction set
progressively.
At the outer layer, components will receive the user interface operations and at the inner layers,
components will perform the operating system interfacing(communication and coordination with
OS)
Intermediate layers to utility services and application software functions.
One common example of this architectural style is OSI-ISO (Open Systems Interconnection-
International Organization for Standardization) communication system.
Component level design
What is component level design in software engineering?
Component-level design occurs directly after the architectural design stage of the
component design process.
During the architectural design stage, basic functionality is implemented for each
component, which allows for a more specific function to be elaborated later during the
component-level design stage.
The component-level design stage provides a dedicated purpose for each component and
describes how the interface, algorithms, data structure, and communication methods of
each component will function to carry out a process.
Components, also known as modules, are the most basic form of building block for
computer-based applications.
They are portable, replaceable, and reusable functions that can be used on future assets,
such as to build a similar application in the future.
A few examples of software components include JavaBean, and .NET, each of which can
reduce the development time and cost of building a new software system.
Component-level design is the third stage in the component design process, occurring
immediately after the architectural design stage.
It describes how the interface, algorithms, data structure, and communication methods of
each component are elaborated in order for the intended functionality of the software to
become fully realized.
It allocates the purpose of each component on a more specific level than during
architectural design.
Component-level design gives functionality and purpose to each component by defining
its interface, algorithms, data structure, and communication methods.
Types of Component Level Design Views
Object-oriented view
Conventional view
Process-related view
Object-Oriented View
Under the object-oriented view, an individual component contains a set of collaborating classes,
or a group of objects with common properties, operations, and relationships to other components.
Classes can be divided into two categories, both of which interact to enable the communication
and collaboration of components:
Analysis classes and design classes are explained together in the object-oriented view to
identify the attributes and operations that apply to the implementation of a specific
component or modular software design.
While the elaboration of each component is applied initially in the architectural design
stage, elaboration takes place again during component-level design in order to provide a
further definition of each attribute, operation, and interface.
Conventional View
Conventional view
Process-Related View
A good system design is to organize the program modules in such a way that are easy to
develop and change. Structured design techniques help developers to deal with the size and
complexity of programs. Analysts create instructions for the developers about how code
should be written and how pieces of code should fit together to form a program.
System design is a critical component of software engineering and involves making
decisions about the architecture, components, modules, interfaces, and data for a
software system. System Design Strategy refers to the approach that is taken to design a
software system.
Why is system level design important?
System design helps software engineers identify potential problems that can affect the
performance of the system. By understanding the system's architecture and its components,
engineers can identify and fix problems before they become too costly to fix. This can help
improve the overall performance of the system.
1. Improved quality: A well-designed system can improve the overall quality of the
software, as it provides a clear and organized structure for the software.
2. Ease of maintenance: A well-designed system can make it easier to maintain and update
the software, as the design provides a clear and organized structure for the software.
3. Improved efficiency: A well-designed system can make the software more efficient, as it
provides a clear and organized structure for the software that reduces the complexity of
the code.
4. Better communication: A well-designed system can improve communication between
stakeholders, as it provides a clear and organized structure for the software that makes it
easier for stakeholders to understand and agree on the design of the software.
5. Faster development: A well-designed system can speed up the development process, as it
provides a clear and organized structure for the software that makes it easier for
developers to understand the requirements and implement the software.
Disadvantages of using a System Design Strategy:
2. Inflexibility: Once a system has been designed, it can be difficult to make changes to the
design, as the process is often highly structured and documentation-intensive.
There are several strategies that can be used to design software systems, including the
following:
Top-Down Design: This strategy starts with a high-level view of the system and
gradually breaks it down into smaller, more manageable components.
Bottom-Up Design: This strategy starts with individual components and builds the
system up, piece by piece.
Iterative Design: This strategy involves designing and implementing the system in stages,
with each stage building on the results of the previous stage.
Incremental Design: This strategy involves designing and implementing a small part of
the system at a time, adding more functionality with each iteration.
Agile Design: This strategy involves a flexible, iterative approach to design, where
requirements and design evolve through collaboration between self-organizing and cross-
functional teams.
Top-down approach:
Each system is divided into several subsystems and components. Each of the subsystems is
further divided into a set of subsystems and components. This process of division facilitates
forming a system hierarchy structure. The complete software system is considered a single entity
and in relation to the characteristics, the system is split into sub-systems and components. The
same is done with each of the sub-systems.
This process is continued until the lowest level of the system is reached. The design is started
initially by defining the system as a whole and then keeps on adding definitions of the subsystems
and components. When all the definitions are combined together, it turns out to be a complete
system. For the solutions of the software that need to be developed from the ground level, a top-
down design best suits the purpose.
Advantages:
The main advantage of the top-down approach is that its strong focus on requirements helps to
make a design responsive according to its requirements.
Disadvantages:
Project and system boundaries tend to be application specification-oriented. Thus it is more likely
that the advantages of component reuse will be missed.
HybridDesign:
It is a combination of both top-down and bottom-up design strategies. In this, we can reuse the
modules.
Bottom-up-approach:
The design starts with the lowest level components and subsystems. By using these components,
the next immediate higher-level components and subsystems are created or composed. The
process is continued till all the components and subsystems are composed into a single
component, which is considered as the complete system. The amount of abstraction grows high as
the design moves to more high levels.
Where to use and why.
By using the basic information existing system, when a new system needs to be created, the
bottom-up strategy suits the purpose.
Advantages:
It can be used to hide the low-level details of implementation and be merged with the top-down
technique.
Disadvantages:
It leads to the proliferation of ‘potentially useful’ functions rather than the most appropriate ones.
User Interface Design
User interface is the front-end application view to which user interacts in order to use the software. The
software becomes more popular if its user interface is:
Attractive
Simple to use
Responsive in short time
Clear to understand
Consistent on all interface screens
1. Command Line Interface: Command Line Interface provides a command prompt, where the
user types the command and feeds to the system. The user needs to remember the syntax of the
command and its use.
2. Graphical User Interface: Graphical User Interface provides the simple interactive interface to
interact with the system. GUI can be a combination of both hardware and software. Using GUI,
user interprets the software.
A graphic user interface design provides screen displays that create an operating environment
for the user and form an explicit visual and functional context for user’s actions.
It includes standard objects like buttons, icons, text, field, windows, images, pull-down and
pop-up screen menus.
User, task, environmental analysis, and modeling: Initially, the focus is based on the
profile of users who will interact with the system, based on the user’s profile users are
made into categories. From each category requirements are gathered. Based on the
requirements developer understand how to develop the interface. Once all the
requirements are gathered a detailed analysis is conducted. In the analysis part, the
tasks that the user performs to establish the goals of the system are identified,
described and elaborated. The analysis of the user environment focuses on the physical
work environment. Among the questions to be asked are:
Interface Design: The goal of this phase is to define the set of interface objects and
actions i.e. Control mechanisms that enable the user to perform desired tasks.
Indicate how these control mechanisms affect the system. Specify the action
sequence of tasks and subtasks, also called a user scenario. Indicate the state of the
system when the user performs a particular task. This phase serves as the foundation
for the implementation phase.
Interface construction and implementation: The implementation activity begins
with the creation of prototype (model) that enables usage scenarios to be evaluated.
As iterative design process continues a User Interface toolkit that allows the creation
of windows, menus, device interaction, error messages, commands, and many other
elements of an interactive environment can be used for completing the construction
of an interface.
Interface Validation: This phase focuses on testing the interface. The interface
should be in such a way that it should be able to perform tasks correctly and it should
be able to handle a variety of tasks. It should achieve all the user’s requirements. It
should be easy to use and easy to learn. Users should accept the interface as a useful
one in their work.
There are several key principles that software engineers should follow when
designing user interfaces:
User-centered design: User interface design should be focused on the needs and
preferences of the user. This involves understanding the user’s goals, tasks, and
context of use, and designing interfaces that meet their needs and expectations.
Consistency: Consistency is important in user interface design, as it helps users to
understand and learn how to use an application. Consistent design elements such as
icons, color schemes, and navigation menus should be used throughout the
application.
Simplicity: User interfaces should be designed to be simple and easy to use, with
clear and concise language and intuitive navigation. Users should be able to
accomplish their tasks without being overwhelmed by unnecessary complexity.
Feedback: Feedback is important in user interface design, as it helps users to
understand the results of their actions and confirms that they are making progress
towards their goals. Feedback can take the form of visual cues, messages, or sounds.
Accessibility: User interfaces should be designed to be accessible to all users,
regardless of their abilities. This involves considering factors such as color contrast,
font size, and assistive technologies such as screen readers.
Flexibility: User interfaces should be designed to be flexible and customizable,
allowing users to tailor the interface to their own preferences and needs.
Overall, user interface design is a key component of software engineering, as it can
have a significant impact on the usability, effectiveness, and user experience of an
application. Software engineers should follow best practices and design principles to
create interfaces that are user-centered, consistent, simple, and accessible.
Important qualities of User Interface Design are following:
Simplicity:
Consistency:
Intuitiveness :
Prevention :
A good user interface design should prevents users from performing an in-appropriate
task and this is accomplished by disabling or “graying cut” certain elements under certain
conditions.
Forgiveness :
This quality can encourage users to use the software in a full extent.
Designers should provide users with a way out when users find themselves somewhere
they should not go.