Cross-cutting concerns
Concept · Chapter 9
Cross-cutting concerns
Section titled “Cross-cutting concerns”A concern is a grouping of logic or functionality the application provides; concerns map back to the system’s requirements. Architects should apply the Separation of Concerns (SoC) principle to keep concerns apart and reduce complexity.
Two types of concerns
Section titled “Two types of concerns”| Type | What it is | Where the logic lives |
|---|---|---|
| Core concern | Functionality fundamental to why the software exists (e.g. salary/bonus calculation in an HR system) | Localized to specific components |
| Cross-cutting concern | An aspect that relies on and affects other concerns; used in many areas, often across layers (security, logging, caching, error handling) | Needed across multiple components |
Key takeaways
Section titled “Key takeaways”- Core concerns are localized; cross-cutting concerns intersect many core concerns.
- Because cross-cutting logic is needed in many places, naive implementations tend to be duplicated across modules — the problem the rest of the chapter addresses.
- Good design keeps cross-cutting concerns separate from core logic while still making them available wherever needed.
Related
Section titled “Related”- SoC builds on ideas in Minimizing complexity and Designing orthogonal software systems.
- Guidelines for handling them: General guidelines for cross-cutting concerns.
Citations
Section titled “Citations”- Software Architect’s Handbook (Packt, 2018), Ch.9 “Cross-cutting concerns”, pp. 691-692.