Unit 3
Unit 3
Software Design
Software design is a process to transform user requirements into some suitable form,
which helps the programmer in software coding and implementation.
The following items are designed and documented during the design phase:
● Different modules are required.
● Control relationships among modules.
● Interface among different modules.
● Data structure among the different modules.
● Algorithms are required to be implemented among the individual modules.
Software design paradigms are fundamental approaches or philosophies that guide the
process of designing software systems. These paradigms provide principles, concepts,
and methodologies for structuring, organizing, and developing software.
1. Procedural Paradigm: This paradigm focuses on breaking down the program into a
set of procedures or routines. It emphasizes step-by-step instructions and follows a
top-down approach. Languages like C are often associated with this paradigm.
Software design occurs at multiple levels, each focusing on different aspects of the
system's architecture, functionality, and behavior. These levels include:
1. High-level design:
● At this level, architects and designers define the overall structure and
components of the system.
● This includes deciding on the major modules, subsystems, and their interactions.
High-level design typically involves creating architectural diagrams,
● Example : such as UML diagrams or system flowcharts, to illustrate the system's
structure and how components communicate.
2. Detailed design: Detailed design develops deeper into individual components and
modules defined during high-level design. Designers specify the internal logic of each
module, including algorithms, data structures, interfaces, and dependencies. This level
of design is more granular and focuses on ensuring that each module performs its
specified functions efficiently and reliably.
4. Database design: Database design involves defining the structure, organization, and
relationships of the system's data storage. Designers create entity-relationship
diagrams (ERDs) to model the data schema, specifying tables, fields, and constraints.
Database design also includes decisions regarding data normalization, indexing, and
data access strategies to ensure efficient data storage and retrieval.
5. User interface (UI) design: UI design focuses on creating intuitive and visually
appealing interfaces for end-users. Designers consider factors such as usability,
accessibility, and user experience (UX) when designing interfaces for different devices
and platforms. UI design often involves creating wireframes, mockups, and prototypes
to iterate on the layout, navigation, and visual elements of the interface.
6. System architecture design: System architecture design involves defining the overall
structure and organization of the system, including hardware, software, networks, and
other components. Architects make decisions regarding system topology, deployment
models, scalability, security, and performance to meet the system's requirements and
objectives.
Elements of a System
Architecture: This is the conceptual model that defines the structure, behavior, and
views of a system. We can use flowcharts to represent and illustrate the architecture.
Modules: These are components that handle one specific task in a system. A
combination of the modules makes up the system.
Components: This provides a particular function or group of related functions. They are
made up of modules.
Interfaces: This is the shared boundary across which the components of a system
exchange information and relate.
Data: This is the management of the information and data flow.
Strategy of design
● Top-down
● Bottom-up
Use this link to get details
https://www.geeksforgeeks.org/difference-between-bottom-up-model-and-top-do
wn-model/
Software Design Process
Interface Design
Architectural Design
Detailed Design
Detailed Design is the specification of the internal elements of all major system
components, their properties, relationships, processing, and often their algorithms and
the data structures.
The detailed design may include:
● Decomposition of major system components into program units.
● Allocation of functional responsibilities to units.
● User interfaces.
● Unit states and state changes.
● Data and control interaction between units.
● Data packaging and implementation, including issues of scope and visibility of
program elements.
● Algorithms and data structures.
Modularization
Modularization is the process of dividing a software system into multiple independent
modules where each module works independently.
Purpose
● Easy to understand the system.
● System maintenance is easy.
● A module can be used many times as their requirements. No need to write it
again and again.
Benefits
1. Encapsulation: Modules encapsulate related functionality, data, and behavior, hiding
implementation details and exposing only necessary interfaces. This encapsulation
enhances code readability, reduces complexity, and facilitates easier debugging and
maintenance.
4. Scalability: By breaking a system into smaller modules, it becomes easier to scale the
software both vertically (by adding more resources to individual modules) and
horizontally (by replicating modules across multiple instances). This scalability is
crucial for handling increasing loads and accommodating evolving requirements.
When a software program is modularized, its tasks are divided into several modules
based on some characteristics. There are measures by which the quality of a design of
modules and their interaction among them can be measured. These measures are
called coupling and cohesion.
● Logical cohesion - When logically categorized elements are put together into a
module, it is called logical cohesion.
Example : The module contains functions for calculating the average, finding the
maximum and minimum values, and computing the square root of numbers.
● Temporal Cohesion - When elements of a module are organized such that they
are processed at a similar point in time, it is called temporal cohesion.
Example: A module responsible for handling user session management in a web
application, where functions for starting a session, updating session data, and ending a
session are all triggered by user login/logout events and are executed within the same
session lifecycle.
Content coupling - When a module can directly access or modify or refer to the content
of another module, it is called content level coupling.Change in one module needs to
update in other modules.
Example: Suppose you have a billing module that directly accesses the database schema of
the customer module to retrieve customer information for generating bills. Any changes in the
database schema of the customer module would require modifications in the billing module,
leading to tightly coupled systems.
Common coupling- When multiple modules have read and write access to some global
data, it is called common or global coupling.
Example: A system where multiple modules access a global configuration file to fetch various
settings. If the format of the configuration file changes, all modules relying on it need to be
updated, leading to common coupling.
External Coupling: In external coupling, the modules depend on other modules, external
to the software being developed or to a particular type of hardware.
Example : For instance, if one of the payment service providers updates its API version or
changes its authentication mechanism, the payment gateway module would need to be updated
to accommodate these changes. This external coupling introduces a dependency on the
external services, potentially impacting the system's stability, flexibility, and maintenance.
Control coupling- Two modules are called control-coupled if one of them decides the
function of the other module or changes its flow of execution.
Example: The central hub acts as the controller, and the individual devices like Light,
thermostat, security cameras are the controlled modules.
Stamp coupling- When multiple modules share common data structure and work on
different parts of it, it is called stamp coupling.
Example: A module that receives a large object but only uses a small portion of its attributes.
This creates unnecessary dependencies and can lead to inefficiencies.
Data coupling- Data coupling is when two modules interact with each other by means of
passing data (as parameter). If a module passes data structure as parameter, then the
receiving module should use all its components.
Example: An email sending module that receives a data structure containing the email content
and recipient information from a user input module. The email sending module is independent of
the user input module and only requires the data it needs to perform its task.
Ideally, no coupling is considered to be the best.
1. Requirements review: This involves verifying that the software meets the
requirements specified in the software requirement specification (SRS)
document. This includes checking for completeness, consistency, and
correctness of the requirements.
2. Design review: This involves evaluating the software design to ensure that it is
able to meet the requirements specified in the SRS document. This includes
checking the architecture, interfaces, and data structures of the software.
3. Code review: This involves evaluating the source code to ensure that it is of high
quality and adheres to programming best practices and coding standards. This
includes checking for errors, bugs, and security vulnerabilities in the code.
4. Test review: This involves evaluating the testing processes and testing results to
ensure that the software has been adequately tested and is of high quality. This
includes checking for completeness and coverage of the test cases, and the
accuracy of the test results.
5. Usability review: This involves evaluating the user interface and user experience
of the software to ensure that it is easy to use and meets the needs of the
end-users.
7. Reliability review: This involves evaluating the reliability of the software to ensure
that it can operate correctly and continuously under various conditions and
loads.