0% found this document useful (0 votes)
13 views

Software Architecture - Ch5 - Part 1

The document discusses principles of software design and architecture that enhance quality, emphasizing the importance of robustness, usability, efficiency, scalability, security, and maintainability. It highlights key concepts such as modularity, encapsulation, and separation of concerns, which contribute to effective software development and lifecycle management. The principles outlined aim to create high-quality software that is easier to maintain, evolve, and test.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Software Architecture - Ch5 - Part 1

The document discusses principles of software design and architecture that enhance quality, emphasizing the importance of robustness, usability, efficiency, scalability, security, and maintainability. It highlights key concepts such as modularity, encapsulation, and separation of concerns, which contribute to effective software development and lifecycle management. The principles outlined aim to create high-quality software that is easier to maintain, evolve, and test.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 17

Principles of

Software Design
and Architecture
That Promote
Quality
Introduction

OVERVIEW OF SOFTWARE IMPORTANCE OF QUALITY IN RELATIONSHIP BETWEEN


DESIGN AND SOFTWARE DEVELOPMENT DESIGN/ARCHITECTURE
ARCHITECTURE AND SOFTWARE QUALITY
Fundamentals of Software Design and
Architecture
• Definition of Software Design and Architecture
• Software Design: Refers to conceptualising, detailing, and
structuring software components. Design is about how the system is
organised internally: the choice of data structures, algorithms, and
the relationships between various components. It is about creating a
blueprint for the software that details the specific implementation
requirements for achieving the desired functionality.
• Software Architecture: Represents the high-level structure of
software, focusing on how components interact. It is about
defining a system's significant parts and responsibilities and how
they communicate and collaborate to achieve the system's overall
objectives. Architecture is more about the software's overall
framework and structural organisation, guiding how components fit
together to form a coherent system.
Core Objectives of Effective
Design and Architecture
• Robustness: The system should be able to handle and recover from unexpected
conditions or usage scenarios without failing.
• Usability: Design with the end-user in mind, ensuring the system is intuitive and
efficient.
• Efficiency: Optimise for performance, ensuring that the system uses resources
effectively and responds swiftly to user inputs.
• Scalability: Ensure that the system can accommodate growth, whether in data
volume, user load, or transaction frequency, without significant declines in
performance.
• Security: Incorporate security considerations into the design and architecture to
protect against threats and vulnerabilities.
• Maintainability: Facilitate ease of updates, enhancements, and bug fixes without
extensive rework or risk of introducing new issues.
The Impact of Design and Architecture on
the Software Lifecycle
• Development: A well-defined architecture and design streamline the development
process, providing clear guidelines and reducing the likelihood of significant mid-
course corrections.
• Testing: Clear separation of concerns and modularity facilitate more focused and
practical testing, allowing issues to be isolated and addressed more readily.
• Deployment: A robust architecture simplifies the deployment process, particularly in
complex environments or when scaling is required.
• Maintenance: Maintenance is a significant part of software's lifecycle cost. A well-
architected system simplifies maintenance, making updating features, fixing bugs,
and adapting to new requirements easier.
• Evolution: Software needs to evolve to meet changing needs. A flexible and well-
thought-out design and architecture allow for more accessible software evolution over
time.
Features of High-quality Software

• Modularity
• Encapsulation
• Separation of Concerns (SoC)
• The application of the SOLID principles
• The application of DRY principles
• Scalability and Performance
• Testability
• Maintainability and Extensibility
• Resilience and Fault Tolerance
• Applies Best Practices and Patterns
Modularity

• What is Modularity? Modularity is a design principle that


involves breaking down a software system into distinct,
interchangeable units called modules. Each module
encapsulates a specific piece of the software's overall
functionality and communicates with other modules through
well-defined interfaces.
The Advantages of Embracing
Modularity
• Simplified Maintenance: When a system is modular,
modifications or fixes in one module typically do not impact
others, making it easier to manage changes and maintain the
system over time.
• Reusable Components: Modular design promotes the
creation of components that can be reused in different parts
of the application or even across various projects. This reuse
can accelerate development processes and enhance
consistency across different system parts.
Cont.

• Enhanced Testability: With modularity, each component can


be tested independently, allowing for more focused and
practical testing. This can lead to early detection of issues and
easier troubleshooting, as the scope of any problem is limited to
a single module rather than the entire system.
• Scalable Architecture: Modularity lends itself to scalability. As
the need for new functionality arises, new modules can be
developed and integrated into the existing system without
altering the core architecture, facilitating easier and more
efficient scalability.
Encapsulation in Software
Design

• Concept of Encapsulation: Encapsulation is a fundamental principle in


object-oriented programming and design, where a class or module hides
its internal details—data and implementation—while exposing a specific,
controlled interface for interaction.
• This concept is like to how a capsule contains and hides its contents,
revealing only what is necessary through its outer shell.
Encapsulation and Data Hiding
• Data Hiding: Encapsulation enforces data hiding by allowing classes to
restrict access to their internal components, such as attributes or
methods. This is typically achieved using access modifiers, such as
private, protected, and public, which define the visibility and accessibility
of class members.

• Implementation Details: Beyond hiding data, encapsulation also hides


the implementation logic, allowing changes to be made internally
without affecting external components that interact with the class. This
abstraction layer helps manage complexity and fosters modularity.
Advantages of Encapsulation
• Enhanced Modularity: By encapsulating related data and behaviours within
discrete units, software becomes more modular, improving clarity and organisation.
• Increased Robustness: Encapsulation shields the internal state of an object from
unintended or harmful modifications. Only allowed operations can alter the object's
state, reducing the likelihood of bugs or inconsistencies.
• Improved Maintainability: Changes to the internal workings of a class or module
do not necessitate alterations in the broader codebase as long as the public
interface remains unchanged. This isolation simplifies maintenance and upgrades.
• Encourages Abstraction: Encapsulation promotes thinking at a higher level of
abstraction, focusing on what an object does rather than how it does it. This
approach is crucial for designing intuitive and robust interfaces.
Implementing Encapsulation
• Defining Access Levels: Use access modifiers to define who can
interact with class members. For instance, making attributes private and
providing public methods for necessary interactions.
• Mutators and Accessors: Employ getters and setters (accessor and
mutator methods) to manage how external entities can view or modify
the internal state, offering a controlled way to interact with the object's
properties.
• Consistency and Integrity: Encapsulation enables consistency
enforcement through methods, as they can implement validation logic
before modifying the internal state, ensuring the object remains in a valid
or expected state.
Real-World Analogy
• Think of a television set. Users interact with it through a defined interface
(buttons or remote control) without needing to understand or access the
complex circuitry inside.
• The TV encapsulates its internal components and logic, exposing only the
necessary controls to the user, which simplifies its use and prevents
malfunctions from improper internal access.
Separation of Concerns (SoC):
Definition and Application

• What is the Separation of Concerns? SoC is a design


principle that advocates dividing a software application into
distinct sections, each addressing a specific aspect or concern
of the application.
• This approach helps organise code more logically and ensures
that individual parts of the application focus on a single
responsibility or function.
Implementing SoC for Better
Software Design

• Logical Division: Applying SoC means structuring software so


that its constituent parts (user interface, business logic, and
data access layers) have clear, distinct responsibilities. This
separation helps in managing complexity and enhances the
clarity of the codebase.
• Ease of Maintenance: When concerns are well-separated,
maintaining one aspect of the system (like updating the
database schema) is less likely to introduce bugs in unrelated
areas (like the user interface), making maintenance more
straightforward and less risky.
Cont.

• Improved Code Reusability: With a clear separation of


concerns, specific components (like a logging service or
authentication mechanism) can be designed once and reused
throughout the application, reducing redundancy and fostering
a DRY (Do not Repeat Yourself) codebase.
• Enhanced Collaborative Development: When different
concerns are separated, teams can work on different system
parts simultaneously with minimal interference, streamlining
the development process and reducing the likelihood of code
conflicts.

You might also like