What's the difference between Architectural Patterns and Architectural Styles?

Viewed 35107

In Software Architecture - Foundations, Theory and Practice, I can find definitions for both. The problem is that I don't get what each one of them means in plain English:

Architectural Pattern

An Architectural Pattern is a named collection of architectural design decisions that are applicable to a recurring design problem parameterized to account for different software development contexts in which that problem appears.

Architectural Style

An Architectural Style is a named collection of architectural design decisions that (1) are applicable in a given development context, (2) constrain architectural design decisions that are specific to a particular system within that context, and (3) elicit beneficial qualities in each resulting system.

What does each one mean and what are the differences between them?

12 Answers

An Architectural Pattern is a way of solving a recurring architectural problem. MVC, for instance, solves the problem of separating the UI from the model. Sensor-Controller-Actuator, is a pattern that will help you with the problem of actuating in face of several input senses.

An Architectural Style, on the other hand, is just a name given to a recurrent architectural design. Contrary to a pattern, it doesn't exist to "solve" a problem.

Pipe&filter doesn't solve any specific problem, it's just a way of organizing your code. Client/server, Main program & subroutine and Abstract Data Types / OO, the same.

Also, a single architecture can contain several architectural styles, and each architectural style can make use of several architectural patterns.

Architectural Styles

Architectural styles are names which represent the broader organizations of your applications subsystems and depict the idea of the overall outline of the it. Examples are, SOA, Client/Server, Message Bus etc.

Architectural Patterns

Architectural patterns are names of the reusable solutions to the general architectural problems which give an idea of how the inner parts are implemented to solve them. Examples are, 2-Tier, 3-Tier, N-Tier, MVC, REST etc.

One style can use multiple patterns to solve multiple problems. For example, a Client/Server style can use an N-Tier pattern or(and) an MVC pattern for separating its business logic, presentation logic and data logic for introducing modularity which solves modifiability and maintainability problems.

Architecture style describes a system of many components. There is only one application architecture and you have to apply the one architectural style like Microservices, SOA, and event-driven architecture everywhere.

Architecture patterns describe something inside a single component and do not try to apply the same architectural patterns like CQRS or DDD everywhere.

Architectural styles tell us, in very broad strokes, how to organize our code. It’s 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, the relations between them. Examples of Architectural Styles: Component-based, SOA

Architectural Patterns have an extensive impact on the code base, most often impacting the whole application either horizontally (ie. how to structure the code inside a layer) or vertically (ie. how a request is processed from the outer layers into the inner layers and back). Examples of Architectural Patterns: Model-View-Controller, Model-View-ViewModel

Related