upgrade
upgrade

💻Design Strategy and Software I

Software Architecture Styles

Study smarter with Fiveable

Get study guides, practice questions, and cheatsheets for all your subjects. Join 500,000+ students with a 96% pass rate.

Get Started

Why This Matters

Software architecture isn't just about organizing code—it's about making strategic design decisions that determine how your application will scale, evolve, and survive in production. When you're tested on architecture styles, you're being evaluated on your ability to match business requirements, scalability needs, and team capabilities to the right structural approach. The architecture you choose on day one will ripple through every sprint, deployment, and maintenance cycle that follows.

Each style in this guide represents a different answer to fundamental questions: How should components communicate? Where does complexity live? What trade-offs are we willing to accept? Don't just memorize definitions—know what problem each architecture solves, what trade-offs it introduces, and when you'd choose one over another. That's the thinking that separates strategic designers from coders who just follow patterns.


Unified Structure Approaches

These architectures keep your application together as a cohesive whole. The core principle: simplicity through integration, with trade-offs in flexibility and scaling.

Monolithic Architecture

  • Single unified codebase—all components (UI, business logic, data access) are tightly integrated and deployed as one unit
  • Low initial complexity makes this ideal for MVPs, small teams, and applications with well-understood requirements
  • Scaling limitations require replicating the entire application, even if only one feature needs more resources

Layered Architecture

  • Horizontal separation of concerns—organizes code into distinct layers (presentation, business logic, data access) with clear boundaries
  • Change isolation allows modifications within one layer without cascading effects, assuming layer contracts are respected
  • Performance overhead from multiple abstraction layers can impact latency-sensitive applications

Compare: Monolithic vs. Layered—both deploy as a single unit, but Layered enforces internal boundaries that Monolithic doesn't require. If an exam question asks about "improving maintainability without changing deployment strategy," Layered is your answer.


Distributed Service Approaches

These architectures break applications into separate, communicating services. The core principle: independence and flexibility through distribution, with trade-offs in operational complexity.

Client-Server Architecture

  • Clear role separation—clients request services, servers provide them, creating a centralized point of control and data management
  • Horizontal scaling achieved by adding servers behind load balancers to handle increased client demand
  • Network dependency means server overload or network issues directly impact all connected clients

Service-Oriented Architecture (SOA)

  • Enterprise-scale service reuse—services are designed to be orchestrated across multiple applications and business processes
  • Interoperability focus enables communication between different systems, platforms, and technologies through standardized protocols
  • Governance overhead requires careful management of service contracts, versioning, and organizational coordination

Microservices Architecture

  • Fine-grained independence—each service owns its data, can use different tech stacks, and deploys on its own schedule
  • Team autonomy enables parallel development with minimal coordination, supporting continuous delivery practices
  • Distributed systems complexity introduces challenges in inter-service communication, data consistency, and debugging across service boundaries

Compare: SOA vs. Microservices—both distribute functionality across services, but SOA emphasizes enterprise-wide reuse and orchestration while Microservices prioritize team independence and bounded contexts. Microservices typically result in smaller, more numerous services with decentralized governance.


Communication Pattern Architectures

These styles define how data and control flow between components. The core principle: the communication pattern itself becomes the organizing structure.

Event-Driven Architecture

  • Asynchronous by design—components produce, detect, and react to events without waiting for responses, enabling loose coupling
  • Real-time responsiveness makes this ideal for applications requiring immediate reactions to state changes
  • Event flow complexity requires careful management of message ordering, delivery guarantees, and eventual consistency

Pipe and Filter Architecture

  • Sequential data transformation—processing elements (filters) connect via data streams (pipes) to create processing pipelines
  • Filter reusability allows the same processing components to be recombined for different data workflows
  • Parallel processing support enables performance optimization for data-intensive operations like ETL or media processing

Compare: Event-Driven vs. Pipe and Filter—both handle data flow, but Event-Driven responds to discrete occurrences asynchronously while Pipe and Filter processes continuous data streams sequentially. Choose Event-Driven for reactive systems, Pipe and Filter for batch transformations.


Component Organization Patterns

These architectures focus on how individual pieces of your application are structured and interact. The core principle: modularity through clear boundaries and defined interfaces.

Model-View-Controller (MVC)

  • Three-way separation—Model (data/state), View (UI/presentation), and Controller (input handling/business logic) operate independently
  • Parallel development enables designers, frontend developers, and backend developers to work simultaneously
  • Web application standard makes this the dominant pattern for interactive applications requiring clean UI/logic separation

Component-Based Architecture

  • Encapsulated functionality—each component packages specific features with defined interfaces, hiding internal implementation
  • Reusability across projects allows well-designed components to be shared across applications and teams
  • Dependency management becomes critical as component interactions and version compatibility must be carefully tracked

Compare: MVC vs. Component-Based—MVC prescribes a specific three-part separation for UI applications, while Component-Based is a broader principle applicable at any level of abstraction. MVC components follow fixed roles; Component-Based components can encapsulate anything.


Decentralized Architectures

These styles eliminate central control points entirely. The core principle: resilience and resource sharing through distributed ownership.

Peer-to-Peer (P2P) Architecture

  • Symmetric nodes—every participant acts as both client and server, sharing resources directly without central coordination
  • Fault tolerance eliminates single points of failure since the network continues functioning as nodes join and leave
  • Decentralization trade-offs create challenges in security enforcement, data consistency, and content governance

Compare: Client-Server vs. P2P—Client-Server centralizes control and simplifies security but creates bottlenecks and single points of failure. P2P distributes load and improves resilience but sacrifices centralized control. Choose based on whether you need governance or resilience more.


Quick Reference Table

ConceptBest Examples
Simplicity & Fast Initial DevelopmentMonolithic, Layered
Independent Scaling & DeploymentMicroservices, Client-Server
Enterprise Integration & ReuseSOA, Component-Based
Real-Time & Asynchronous ProcessingEvent-Driven, Pipe and Filter
UI/Logic SeparationMVC, Layered
Data Transformation PipelinesPipe and Filter
Decentralized ResilienceP2P
Team Autonomy & Continuous DeliveryMicroservices

Self-Check Questions

  1. Which two architectures both organize code into separate concerns but differ in whether those concerns deploy together or independently? What's the key trade-off between them?

  2. A startup needs to launch quickly with a small team, but expects to scale rapidly if successful. Compare the risks of starting with Monolithic vs. Microservices architecture.

  3. You're designing a system that must process millions of log entries daily, transforming and aggregating data before storage. Which architecture style is most appropriate and why?

  4. Both SOA and Microservices distribute functionality across services. If an FRQ asks you to recommend one for a large enterprise integrating legacy systems vs. a greenfield project with autonomous teams, which would you choose for each and why?

  5. Identify which architecture style best addresses each requirement: (a) eliminating single points of failure, (b) enabling real-time notifications, (c) allowing frontend and backend teams to work independently on a web application.