0% found this document useful (0 votes)
7 views28 pages

Summery For SDA

The document provides an overview of software architecture and design, emphasizing its role as a blueprint for systems that defines components, relationships, and interactions. It outlines the goals of architecture, the role of a software architect, and key software design principles, including the SOLID principles, which guide the creation of maintainable and scalable software. Additionally, it discusses various architectural styles such as layered architecture, client-server, and MVC, highlighting their structures and benefits.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views28 pages

Summery For SDA

The document provides an overview of software architecture and design, emphasizing its role as a blueprint for systems that defines components, relationships, and interactions. It outlines the goals of architecture, the role of a software architect, and key software design principles, including the SOLID principles, which guide the creation of maintainable and scalable software. Additionally, it discusses various architectural styles such as layered architecture, client-server, and MVC, highlighting their structures and benefits.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Welcome

Software Architecture and Design


By Eng.Adulahi M. Adan

http://www.mahergelle.com
Chapter TWo: -
Software Architecture
Introduction
Software Architecture and Design

• The architecture of a system describes its major components, their


relationships (structures), and how they interact with each other.
• Software architecture and design is a process that includes several
contributory factors such as Business strategy, quality attributes,
human dynamics, design, and IT environment.
Introduction
Software Architecture and Design
Software Architecture
Software Architecture and Design

• Architecture serves as a blueprint for a system.


• It defines a structured solution to meet all the technical and
operational requirements, while optimizing the common quality
attributes like performance and security.
Software Architecture Design
Software Architecture and Design

• A
Goals of Architecture
Software Architecture and Design

• The primary goal of the architecture is to identify


requirements that affect the structure of the application.
• Expose the structure of the system, but hide its implementation details.
• Realize all the use-cases and scenarios.
• Try to address the requirements of various stakeholders.
• Handle both functional and quality requirements
Role of Software Architect
Software Architecture and Design

• A Software Architect provides a solution that the technical team


can create and design for the entire application.
• A software architect should have expertise in the following areas:

• Design Expertise: Expert in software design, including diverse


methods and approaches such as object-oriented design.
Role of Software Architect
Software Architecture and Design

• Domain Expertise: Expert on the system being developed and


plan for software evolution.
• Assist in the requirement investigation process assuring
completeness and consistency.
• Technology Expertise: Expert on available technologies that helps
in the implementation of the system.
• Methodological Expertise: Expert on software development
methodologies that may be adopted during SDLC.
Architecture Design Process
Software Architecture and Design

• Understand The Problem


• Identify Design Elements and their Relationships
• Evaluate the Architecture Design
Today's Agenda

Software
Design
Principles
Software Design
Principles
Software design principles are fundamental guidelines that
help developers create clean, maintainable, and scalable
software.
Applying these principles leads to more robust and efficient
software systems that are easier to test and debug.
Understanding these principles is essential for software
engineers.

Clean Code Maintainable Scalable


SOLID Principles
The SOLID principles are a set of five design principles intended to make software designs more
understandable, flexible, and maintainable.
Introduced by Robert C. Martin, these principles are essential for object-oriented programming.
They guide developers in creating robust and adaptable software architectures, which are key to the
long-term success of any software project. SOLID is the cornerstone of modern software design practices.
Single Responsibility Open/Closed Liskov Substitution
Principle (SRP) Principle Principle (LSP)
(OCP)

Interface Segregation Principle Dependency Inversion


(ISP) Principle (DIP)
Single Responsibility
Principle (SRP)
The Single Responsibility Principle (SRP) states that a class should have only one reason to change.
This means that a class should have only one job or responsibility. By adhering to SRP, you keep your
code modular and easier to maintain. Each class should focus on a single aspect of the system, preventing
it from becoming a dumping ground for unrelated functionality, and making code easier to understand.

Before After
A class with multiple responsibilities Breaking down a class into smaller
is hard to maintain, test and classes makes testing, refactoring, and
understand.
reuse easier.
Open/Closed
Principle (OCP)
The Open/Closed Principle (OCP) asserts that software entities (classes,
modules, functions, etc.) should be open for extension but closed for
modification.
This principle enables you to add new functionality without altering
existing code, reducing the risk of introducing bugs. Using inheritance or
interfaces, you can extend functionality while ensuring that the original
class remains stable and unchanged.
Original
Class for Modification.
Closed
Inheritance
/Interfaces
Open for Extension
New
Functionali
Added without modifying the Original Class.
ty
Liskov Substitution
Principle (LSP)
The Liskov Substitution Principle (LSP) states that subtypes must be substitutable for their base types
without altering the correctness of the program.
In other words, if you have a base class and several derived classes, you should be able to use any of the
derived classes in place of the base class without causing unexpected behavior. This ensures that
inheritance is used correctly and promotes a robust design.
Subtype 1
2 Extends the base functionality.

Base Class 1
Defines the base functionality.

Subtype 2
Can be used interchangeably with the Base
3 Class
Interface Segregation
Principle (ISP)
The Interface Segregation Principle (ISP) advises that clients should not be forced to depend on interfaces they do not
use.
Instead of having one large interface with many methods, it is better to split it into smaller, more specific interfaces.
This reduces the dependencies and prevents classes from implementing methods they don't need, leading to a more
modular and maintainable codebase, and easier refactoring.
Before After
A large interface forces classes to implement Smaller, specific interfaces reduce dependencies and
unnecessary methods. promote clean code.
Other Important
Principles
Beyond the SOLID principles, there are several other design principles that can significantly improve the quality of your
code. These principles focus on simplicity, avoiding redundancy, and planning for future needs without
over-engineering.

DRY
1
Don’t Repeat
Yourself.
KISS
2
Keep It Simple,
Stupid.
YAGNI
3
You Ain’t Gonna
Need It.
4 High Cohesion & Low
Coupling
Benefits of Design
Principles
40% 30%

Reduced Faster
Bugs
Fewer bugs due to modular Develop
Increased development
and testable code.
ment
speed due to code
reusability
50%

Lower
Costs costs
Lower maintenance
due to clean architecture.
Today's Agenda

Architectural
Styles
Architectural Styles: The Big
Picture
Architectural styles are reusable solutions to common design problems, providing a high-level system organization. They help in
defining the overall structure and behavior of a software system, ensuring that all components work together harmoniously.

Layered
Organizes the system into horizontal layers.

Client-Server
Divides the system into client and server components.

MVC
Separates the application into model, view, and controller.
Layered Architecture: Structure and
Separation
Layered architecture organizes a system into horizontal layers, each performing a specific role. This
modular approach promotes separation of concerns, making the system easier to understand,
maintain, and test.
Layers Benefits Considerations
• Presentation • Easy to understand • Performance overhead
• Business Logic • Maintainability • Tight coupling
• Data Access • Testability
• Database
Layered Architecture:
Structure and
Separation
Client-Server Architecture: A Central
The client-server architecture divides the system into two distinct parts: the client, which requests
Hub
services, and the server, which provides those services. This model is fundamental to many
network-based applications, offering scalability and centralized control.

500K 1 99.9%
Clients Server Uptime
Potential client connections Number of servers in the example Server uptime guarantee
deployment
Model-View-Controller (MVC):
Separation of Concerns
The MVC pattern separates an application into three interconnected
parts: the Model (data and business logic), the View (user interface),
and the Controller (user input and application flow). This separation
enhances maintainability and testability.

1 Model
Data and business logic

2 View
User interface

3 Controller
User input and application flow
Diagrams
Software Architecture and Design

• Use case Diagram


• Class Diagram
• ERD Diagram
Thank you
@Eng.Abdulahi Mohamed

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy