The outer circles are mechanisms. The inner circles are policies.
The overriding rule that makes this architecture work is The Dependency Rule . This rule says that source code dependencies can only point inwards .
- Use Cases
- Adapters (Controllers, Gateways, Presenters)
Only Four Circles?
No, the circles are schematic. You may find that you need more than just these four. There’s no rule that says you must always have just these four.
What data crosses the boundaries.
Typically the data that crosses the boundaries is simple data structures.
So when we pass data across a boundary, it is always in the form that is most convenient for the inner circle.
** See also this interesting series of posts about application architecture, with illustrative examples in PHP: OOP Business Applications — Whitewashing