Architectural Styles vs. Architectural Patterns vs. Design Patterns Flashcards
What is the key difference between these 3 terms?
Scope
What is an architecture style?
Architectural styles tell us, in very broad strokes, how to organise 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:
- Component-based
- Monolithic application
- Layered
What is a pattern in this context?
Pattern is a recurring solution to a recurring problem.
What is an Architectural Pattern?
It is a way to implement an Architectural Style.
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:
- Three-tier
- Microkernel
- Model-View-Controller
- Model-View-ViewModel
What is a Design Pattern?
Design Patterns differ from Architectural Patterns in their scope, they are more localised, they have less impact on the code base, they impact a specific section of the code base.