Architecture Patterns vs Architectural Styles

TL;DR: Architectural Style is the application design at the highest level of abstraction. An Architectural Pattern is a way to implement an Architectural Style.

A pattern is a solution to a common problem.

Software has typically two types of patterns, design patterns and architectural patterns.

Design Patterns are the ones closely related to the code and their scope is limited to just a portion of the code base.

Examples of Design Patterns:

  • Singleton
  • Factory
  • Builder
  • Prototype

Architectural Patterns are the ones closely related to how a system is configured, they are configured in a higher level compared to design patterns and, for this reason, they affect an extensive portion of the code base.

Architectural patterns address various issues in software engineering, such as computer hardware performance limitations, high availability, minimization of a business risk, etc.

Examples of Architectural Patterns:

  • Model View Controller (MVC)
  • Model View ViewModel (MVVM)
  • Three-tier
  • Microkernel

A Software Architectural Style is a specific method of construction of a system. They tell how the system is organized. It is the highest level of granularity and it specifies layers, high-level modules of the application, and how those modules and layers interact with each other.

Examples of Architectural Styles:

  • Monolithic
  • Microservices
  • Serverless
  • Component-based

The main differences among those three concepts could be described as:

  • An Architectural Style is the application design at the highest level of abstraction.

  • An Architectural Pattern is a way to implement an Architectural Style.

  • A Design Pattern is a way to solve a localised problem.