Overview of Software Architecture Patterns

Aug 27, 2024

Software Architecture Patterns Lecture Notes

Introduction

  • Welcome to Whiteboard Programming
  • Focus on simplifying programming with whiteboard videos.
  • Topic: Common software architecture patterns used by enterprises globally.

What is Software Architecture Patterns?

  • Definition: Pictorial representation of an IT system; serves as a blueprint.
  • Purpose:
    • Manage system complexity.
    • Establish communication and coordination among components.
    • Define structured solutions for technical and operational requirements.
    • Optimize quality attributes like performance and security.
  • Goal: Identify requirements that affect application structure, reduce business risks, and bridge business and technical needs.

Major Software Architecture Patterns

  1. Layered Pattern

    • Structure programs into groups of subtasks at different abstraction levels.
    • Layers provide services to the next higher layer.
    • Common layers:
      • Presentation Layer (UI Layer)
      • Application Layer (Service Layer)
      • Business Logic Layer (Domain Layer)
      • Data Access Layer (Persistence Layer)
    • Used in desktop applications and e-commerce web applications.
  2. Client-Server Pattern

    • Consists of a server and multiple clients.
    • Server provides services to clients; clients request services.
    • Commonly used in online applications (e.g., email, banking).
  3. Master-Slave Pattern

    • Master distributes work among slave components.
    • Final result computed from slaves' outputs.
    • Employed in database replication and peripheral connections.
  4. Event-Bus Pattern

    • Deals with events with four components:
      • Event Source
      • Event Listener
      • Channel
      • Event Bus
    • Sources publish messages; listeners subscribe to channels.
    • Used in Android development and notification services.
  5. Pipe-Filter Pattern

    • Structures systems producing and processing data streams.
    • Each processing step enclosed in a filter; data passed through pipes.
    • Used in compilers and workflows in bioinformatics.
  6. Broker Pattern

    • Structures distributed systems with decoupled components.
    • Broker coordinates communication; servers publish services.
    • Commonly used in message broker software (e.g., Apache Kafka).
  7. Peer-to-Peer Pattern

    • Components (peers) can act as clients or servers.
    • Peers provide and request services from each other.
    • Used in file-sharing networks and blockchain products.
  8. Model-View-Controller (MVC) Pattern

    • Divides applications into three parts:
      • Model: Core functionality and data.
      • View: Displays information to users.
      • Controller: Handles user input.
    • Decouples components, allowing efficient code reuse.
    • Foundation for web frameworks like Django and Rails.
  9. Interpreter Pattern

    • Designs components that interpret programs in a dedicated language.
    • Each class corresponds to a symbol of the language.
    • Used in database query languages (e.g., SQL).
  10. Blackboard Pattern

    • Useful for problems without deterministic solution strategies.
    • Components:
      • Blackboard: Global memory containing solution objects.
      • Knowledge Source: Specialized modules.
      • Control Component: Manages module execution.
    • Used in applications like speech recognition and tracking systems.

Conclusion

  • Hope the video was helpful and provided value.
  • Encouraged audience to like and subscribe for more content.