In Age of New Worlds, bounded contexts are not only a design idea. They are something I want the test suite to defend.
It is easy to draw clean diagrams early in a project. The hard part is keeping them true after months of adding features, fixing UI problems, wiring multiplayer, changing saves, and moving logic between client and server.
A boundary does not usually break dramatically. It breaks through one convenient import, one shortcut, one helper used from the wrong layer, one piece of presentation logic leaking into the domain.
So I try to make those mistakes fail loudly.
(more…)