Designing a Domain Model That Actually Models the Domain
python
dev.to
Ports and adapters only work if you have a domain worth protecting. If your domain objects are just bags of getters and setters no behavior, no rules, no real logic the boundaries don't buy you much. You've built a clean fence around an empty lot. This post is about filling the lot. The Anemic Domain Model Here's the Order and Customer you see in most codebases even the "clean" ones: from dataclasses import dataclass from typing import List, Optional @dataclass class OrderIt