Software Architecture Essentials: Design Principles & Patterns

Posted by Anonymous and classified in Computers

Written on in English with a size of 7.09 KB

Software Architecture Fundamentals

  • Definition (IEEE): The fundamental organization of a software system, including components, their relationships, and design principles.

  • Purpose: To ensure reliability, efficiency, security, and maintainability.


Architectural Design Process

  • Goal: Design the system’s overall structure and its communication.

  • Outputs: An architectural model showing component interaction.

  • Key Link: Connects requirements to design.


Software Architecture Documentation

  • Includes:

    • Product Overview

    • Static and Dynamic Architectural Models

    • Mapping Between Models

    • Design Rationale


Architectural Abstraction Levels

  • In the Small: Structure of a single program.

  • In the Large: Structure of enterprise-level systems across networks.


Benefits of Explicit Architecture

  • Stakeholder Communication

  • System Analysis (e.g., Performance, Security)

  • Supports Product-Line Reuse


Architectural Modeling Notations

  • Box-and-Line Diagrams: Abstract, great for communication.

  • UML Diagrams:

    • Component Diagrams

    • Package Diagrams

    • Deployment Diagrams


Component-Based UML Diagrams

  • Elements: Components, Interfaces, Ports, Relationships, Artifacts, Nodes.

  • Steps:

    1. Identify System Scope

    2. Define Components and Interfaces

    3. Map Relationships and Dependencies

    4. Draw the Diagram


Key Architectural Design Decisions

  • Vary by system but typically include:

    • Non-functional Properties (Performance, Maintainability, etc.)

    • Technology Stacks

    • Security and Reuse Decisions


Software Architecture Reuse

  • Used in: Same Domain, Similar Architectures

  • Method: Application Product Lines with Core Architecture and Variants


Impact of Software Architecture

  • Affects Non-functional Properties:

    • Performance: Localize Critical Operations

    • Security: Layered Architecture

    • Safety: Isolate Critical Features

    • Maintainability: Fine-Grain, Replaceable Parts

    • Availability: Redundancy


Architectural Design Trade-offs

Trade-OffOne SideOther Side
Maintainability vs. PerformanceModular, Replaceable ComponentsFewer Components, Better Speed
Security vs. UsabilityMore Layers, Less RiskMore Layers, Worse User Experience (UX)
Availability vs. Time to MarketMore Redundancy, Higher UptimeIncreases Development Time and Cost

Architectural Views: 4+1 Model

  • Logical View: Object Design

  • Development View: Module Structure

  • Process View: Dynamic Behavior, Concurrency

  • Physical View: Deployment

  • Scenarios (Use Cases): Validate All Other Views


Common Architectural Patterns

A pattern is a reusable solution to a recurring design problem.


MVC: Model-View-Controller Pattern

  • Model: Handles Business and Data Logic

  • View: Presentation and User Interface (UI)

  • Controller: Handles Input and Updates View or Model

  • Use Case: Applications with Multiple User Interfaces (UIs)

  • Advantage: Independent Changes in Model or User Interface (UI)


Layered Architecture Pattern

  • Divides a system into layers by functionality.

  • Rule: Layers Communicate Only with Directly Adjacent Layers.

  • Example: Web Application (User Interface, Business Logic, Database Access)

  • Pros: Modularity, Security, Easy Testing.

  • Cons: Difficult to Separate Layers Cleanly, Slower Performance.


Client-Server Architecture Pattern

  • Client: Requests Services

  • Server: Delivers Services (e.g., Printing, Database, etc.)

  • Advantages: Centralized Services, Scalable

  • Disadvantages: Single Point of Failure, Network Latency


Multi-Tier (N-Tier) Architecture Pattern

  • Web Tier (User Interface) → Application Tier (Business Logic) → Data Tier (Data Storage)

  • Promotes Separation of Concerns and Scalability


Addressing Cross-Cutting Concerns

  • Affect All Parts of a System (e.g., Logging, Security, Performance)

  • Difficult to Isolate; Must Plan Early in Architecture Design


Types of Application Architectures

TypeDescriptionExample
Data ProcessingBatch Processing, No User InteractionPayroll System
Transaction ProcessingRespond to User Input, Update DatabaseATM, E-commerce
Event ProcessingReact to External EventsAlarm System
Language ProcessingParse User Commands or Formal LanguageCompilers, Interpreters

Real-World Architecture Examples

  • ATM System: Transaction-Based, Client-Server

  • Web E-commerce: Multi-Tier, MVC

  • Mentcare: Information System with Multiple Layers

  • Canvas (Example): Requires Unit Tests, Component Tests, System Tests, and Inspections


Technology Stack Selection

  • Database: SQL (e.g., MySQL) vs. NoSQL (e.g., MongoDB)

  • Delivery Platform: Mobile (Performance and Power Limits), Web

  • Server: In-House vs. Cloud (e.g., AWS, Azure)

  • Development Tools: Choose Tools Familiar to the Team

Related entries: