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 Engl
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 Style is abstract i.e. conceptual.
+---------------+--------------------------------------------------------+
| Category | Architecture styles |
+---------------+--------------------------------------------------------+
| Communication | SOA, ROA, Message Bus |
| Deployment | Client/Server |
| Domain | Domain Driven Design,Monolithic application |
| Structure | Component-Based, Object-Oriented, Layered, Plug-ins |
+---------------+--------------------------------------------------------+
An Architectural Pattern is concrete i.e. implementation of an Architectural Style.
A Design pattern is a general reusable solution to a commonly occurring problem in software design at architectural level.
Analogy: Temples architecture style for different religions:
In my view, patterns and architectural styles are complementary mechanisms for encapsulating design expertise. An architectural style provides a collection of building block design elements, rules and constraints for composing the building blocks, and tools for analyzing and manipulating designs created in the style. Styles generally provide guidance and analysis for building a broad class of architectures in a specific domain whereas patterns focus on solving smaller, more specific problems within a given style (or perhaps multiple styles).
Architectural Patterns – define a general set of element types and their interactions. Examples of Architectural Patterns include Pipes and Filters, Model–View–Controller, and Reflection.
Architectural Style – the term was coined by Garlan and Shaw, it is an idiomatic pattern of system organization. For example, a client–server system is an architectural style.
p.s : Many of the original architectural styles have been reformulated as patterns.
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
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 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.