🏗️Clean Architecture
Also known as Onion Architecture, Uncle Bob Architecture
The rules of the business sit in the middle. Tools stay at the edge.
Think of it like
Think of it like an onion. The most important part is in the middle, safe from the outside.
Example
Lucy's pricing rules live in plain code with no database calls. Her team moves from one database to another, and not one pricing line changes.
Why it matters
The rules are what make a business unique. Keeping them apart from tools means they outlive those tools.
Definition
Common mistake
Key takeaways
- 1Rules in the center. The heart of the app.
- 2Point inward. Center knows nothing outside.
- 3Swap the tools. Rules stay the same.