As part of the patterns & practices App Arch Guide 2.0 project, we needed to nail down layers and tiers.
Layers vs. Tiers
The original App Arch Guide distinguished between layers and tiers:
“This guide uses the term layer to refer to a component type and uses the term tier to refer to physical distribution patterns.”
In other words, layers are logical and tiers are physical (two-tier, three-tier, N-tier). This distinction is helpful, particularly when you want to talk about where you run your layers (which tier).
Presentation Layer, Business Layer and Data Layer
While there’s some variations in layer terms, many people that build application will identify with presentation, business, and data layers. Here’s an example:
- Presentation Layer – provides interactive access to the application. (You could argue that user interaction layer might be more appropriate.)
- Business Layer – the logical grouping of components and services that provide the business functionality in your application.
- Data Layer – the logical grouping of the components and services that provide data access functionality in your application. (You could argue to call it your resource access layer.)
Two-Tier, Three-Tier, and N-Tier
As mentioned earlier, you can think of tiers as physical distribution patterns. Here are some visual examples:
Here’s some links you might find useful:
- Designing Presentation Layers (App Arch Guide)
- Components and Tiers in Applications and Services (App Arch Guide)
- Appendix 3: Layered Architectures (App Arch Guide)
- Layered Application (Enterprise Solution Patterns)
- Tiered Distribution (Enterprise Solution Patterns)
- Three-Tiered Distribution (Enterprise Solution Patterns)
- Choosing the Right Presentation Layer Architecture (The Architecture Journal)
My Related Posts