Software Design and Architecture
1. The Process of Design
Definition: Software design is the process of envisioning and defining software solutions to one
or more sets of problems.
Steps:
1. Understand Requirements: Analyze what the software must do.
2. Architectural Design: Identify major modules/components and their relationships.
3. Detailed Design: Design the internals of each component/module.
4. Review and Refine: Ensure the design meets all requirements and quality goals.
2. Principles Leading to Good Design
1. Modularity: Breaking the system into small, manageable, and independent modules.
2. Abstraction: Hiding internal complexities and showing only the necessary parts.
3. Encapsulation: Keeping data and the methods that act on the data together.
4. Separation of Concerns: Dividing the application into distinct sections, each addressing
a separate concern.
5. Low Coupling & High Cohesion:
 Low Coupling: Minimize dependencies between components.
 High Cohesion: Ensure each module focuses on a single task.
6. Reusability: Design components that can be reused across different parts of the
application.
7. Scalability & Maintainability: Support growth and future changes with ease.
3. Techniques for Making Good Design Decisions
1. Trade-off Analysis: Weigh pros and cons of various design options.
2. Design Patterns: Use established solutions for common problems.
3. Prototyping: Build early versions to validate the design.
4. Stakeholder Feedback: Gather input from developers, users, and business analysts.
5. Design Reviews: Perform peer reviews and walkthroughs to identify flaws early.
4. Writing a Good Design Document
A design document should include:
1. Introduction: Purpose, scope, and goals.
2. Architecture Overview: High-level structure and design principles.
3. Component Design: Details of each major module.
4. Data Design: Data structures, database schema.
5. Interface Design: UI design and API specifications.
6. Use Cases: Sample scenarios and workflows.
7. Design Rationale: Explanation of major decisions and trade-offs.
5. Pattern Introduction
Design Pattern: A general reusable solution to a commonly occurring problem within a given
context in software design.
Categories:
- Creational: Object creation mechanisms (e.g., Singleton).
- Structural: How classes and objects are composed (e.g., Adaptor, Façade).
- Behavioral: Communication between objects (e.g., Observer, Delegation).
6. Design Patterns
- Abstraction-Occurrence Pattern: Separates common and variable parts (abstraction and
occurrences).
- General Hierarchical Pattern: Organizes system entities into hierarchical structures (like
trees).
- Play-Role Pattern: Describes objects playing different roles in different contexts.
- Singleton Pattern: Ensures a class has only one instance and provides a global point of
access to it.
- Observer Pattern: Defines a one-to-many dependency between objects so that when one
object changes state, all dependents are notified.
- Delegation Pattern: One object delegates responsibility to another helper object.
- Adaptor Pattern: Allows incompatible interfaces to work together by wrapping one
interface into another.
- Façade Pattern: Provides a simplified interface to a complex subsystem.
- Immutable Pattern: Ensures the object's state cannot be modified after creation.
- Read-Only Interface Pattern: Exposes a limited, non-modifiable view of an object to the
client.
- Proxy Pattern: Provides a surrogate or placeholder for another object to control access to it.
7. Software Architecture
Contents of an Architecture Model:
1. System Components: Description of each component/module.
2. Relationships: How components interact.
3. Constraints: Non-functional requirements like scalability, security.
4. Architectural Views:
- Logical View: Design's functionality.
- Development View: Software management.
- Process View: Runtime processes.
- Physical View: Hardware and network.
8. Architectural Patterns
1. Multilayer Architecture: Divides the system into layers (e.g., presentation, business
logic, data).
2. Client-Server Architecture: Splits system into clients (requesters) and servers
(providers).
3. Broker Architecture: Middleware coordinates communication between distributed
components.
4. Transaction Processing Architecture: Processes transactions in a consistent and reliable
manner.
5. Pipe & Filter Architecture: Breaks down tasks into a series of processing elements
(filters) connected by channels (pipes).
6. Model-View-Controller (MVC): Separates application into Model (data), View (UI), and
Controller (logic).

Software Design and Architecture_Notes (1).docx

  • 1.
    Software Design andArchitecture 1. The Process of Design Definition: Software design is the process of envisioning and defining software solutions to one or more sets of problems. Steps: 1. Understand Requirements: Analyze what the software must do. 2. Architectural Design: Identify major modules/components and their relationships. 3. Detailed Design: Design the internals of each component/module. 4. Review and Refine: Ensure the design meets all requirements and quality goals. 2. Principles Leading to Good Design 1. Modularity: Breaking the system into small, manageable, and independent modules. 2. Abstraction: Hiding internal complexities and showing only the necessary parts. 3. Encapsulation: Keeping data and the methods that act on the data together. 4. Separation of Concerns: Dividing the application into distinct sections, each addressing a separate concern. 5. Low Coupling & High Cohesion:  Low Coupling: Minimize dependencies between components.  High Cohesion: Ensure each module focuses on a single task. 6. Reusability: Design components that can be reused across different parts of the application. 7. Scalability & Maintainability: Support growth and future changes with ease. 3. Techniques for Making Good Design Decisions 1. Trade-off Analysis: Weigh pros and cons of various design options. 2. Design Patterns: Use established solutions for common problems. 3. Prototyping: Build early versions to validate the design. 4. Stakeholder Feedback: Gather input from developers, users, and business analysts. 5. Design Reviews: Perform peer reviews and walkthroughs to identify flaws early. 4. Writing a Good Design Document A design document should include: 1. Introduction: Purpose, scope, and goals. 2. Architecture Overview: High-level structure and design principles. 3. Component Design: Details of each major module. 4. Data Design: Data structures, database schema.
  • 2.
    5. Interface Design:UI design and API specifications. 6. Use Cases: Sample scenarios and workflows. 7. Design Rationale: Explanation of major decisions and trade-offs. 5. Pattern Introduction Design Pattern: A general reusable solution to a commonly occurring problem within a given context in software design. Categories: - Creational: Object creation mechanisms (e.g., Singleton). - Structural: How classes and objects are composed (e.g., Adaptor, Façade). - Behavioral: Communication between objects (e.g., Observer, Delegation). 6. Design Patterns - Abstraction-Occurrence Pattern: Separates common and variable parts (abstraction and occurrences). - General Hierarchical Pattern: Organizes system entities into hierarchical structures (like trees). - Play-Role Pattern: Describes objects playing different roles in different contexts. - Singleton Pattern: Ensures a class has only one instance and provides a global point of access to it. - Observer Pattern: Defines a one-to-many dependency between objects so that when one object changes state, all dependents are notified. - Delegation Pattern: One object delegates responsibility to another helper object. - Adaptor Pattern: Allows incompatible interfaces to work together by wrapping one interface into another. - Façade Pattern: Provides a simplified interface to a complex subsystem. - Immutable Pattern: Ensures the object's state cannot be modified after creation. - Read-Only Interface Pattern: Exposes a limited, non-modifiable view of an object to the client. - Proxy Pattern: Provides a surrogate or placeholder for another object to control access to it. 7. Software Architecture Contents of an Architecture Model: 1. System Components: Description of each component/module. 2. Relationships: How components interact. 3. Constraints: Non-functional requirements like scalability, security. 4. Architectural Views: - Logical View: Design's functionality. - Development View: Software management.
  • 3.
    - Process View:Runtime processes. - Physical View: Hardware and network. 8. Architectural Patterns 1. Multilayer Architecture: Divides the system into layers (e.g., presentation, business logic, data). 2. Client-Server Architecture: Splits system into clients (requesters) and servers (providers). 3. Broker Architecture: Middleware coordinates communication between distributed components. 4. Transaction Processing Architecture: Processes transactions in a consistent and reliable manner. 5. Pipe & Filter Architecture: Breaks down tasks into a series of processing elements (filters) connected by channels (pipes). 6. Model-View-Controller (MVC): Separates application into Model (data), View (UI), and Controller (logic).