Architecture-Evident Coding Style

Simon Brown writes about an architecturally-evident coding style. He proposes to structure the components (what Eric Evans calls modules in Domain-Driven Design) along the architecture: In his example, he prefers functional components (parts of the domain) over a layer-style separation of the various program parts.

He concludes with:

The thinking [here] behind creating a micro-services architecture is essentially the same […]

Which seems a reasonable approach. He notes that this way of architecture design does not apply everywhere, of course. He notes the example of writing unit tests with mocks if the whole component only exposes a domain-layer interface.

I tend to agree with this design, as I like putting the domain as much into focus as possible. It might be a valid approach even to consider parts of the technical solution (i.e. persistence) as part of the domain. Still, it seems valid to cut a larger application along domains, if only to keep the various components small and isolated.

Note: Self-Contained Systems

Self-Contained Systems are a software-architecture pattern, described on They are similar to micro services, but include a UI. They are full systems with everything, they do not depend on other things. They represent a single, vertical slice through the overall system.

One advantage, according to Eberhard Wolff as he describes on his video cast, is that a functional requirement can be solved completely within this system. You (usually) don’t have to cross developer teams when you change things; API may turn to be internal APIs if they are not required externally, and may be easier to manage.

Patterns 42, from Arc42

The team of Arc 42 (the architecture documentation template) collects a set of patterns on a seperate subsite:

The site seems to be somewhat current, with most content on the corrensponding GitHub repository from about 2018.

The Pattern cover mostly large scale system patterns, but include some of the better known GoF patterns as well. Patterns include:

  • Hexagonal Architecture
  • MicroServices
  • Anti-Corruption-Layers
  • Design Patterns from GoF