Learn

Architecture & pattern guides

Read the idea, build it on a Grid, prove it in a challenge. Short, practical guides — illustrated with RodGrid's own nodes — on system design, design patterns, flow modeling, and how to get the most out of the app.

All articles

Conformist

The decision to adopt an upstream model as-is instead of translating it: a deliberate trade-off when that model is good enough, you have no leverage and translation would cost more than the coupling; what it costs, how far it should reach, and when to switch to an Anti-Corruption Layer.

Why does payroll say "assignment"?

A developer joins the payroll team of a 400-person engineering firm and, in the first week, asks what every newcomer asks: why does the code talk about workers and assignments when everyone in the payroll office says employees and contracts? The firm runs HR on a platform bought from a vendor. HR records hires, pay rises and leavers there, and payroll reads them every month to compute the pay run. Years ago the payroll team decided to use the platform's model exactly as it comes: its names, its shapes, its rules for which change takes effect on which date.

This was a decision, not an oversight. The HR platform is upstream: when its model changes, payroll, downstream, feels it, and payroll chose to follow it rather than resist it. That choice has a name: payroll is a Conformist to the HR platform. Context map: how bounded contexts relate maps upstream, downstream and the other relationships two contexts can have; this article is about one decision, conform or translate.

Taking their model as it comes

A Conformist deliberately leaves out the translation layer that would otherwise sit at the boundary between the two contexts (Bounded Context draws that boundary). It takes the upstream model as its own, for the part it uses, and writes its code in the upstream's terms: a Worker class with the vendor's fields, an Assignment with the vendor's effective dates, and no mapping in between.

From outside it looks like the path of least effort, which is why it gets mistaken for laziness. It is a strategic trade-off: the downstream accepts coupling to a model it does not control, in exchange for not building and maintaining a translation.

Payroll conforms to the HR platform

Payroll uses the platform's workers and assignments under the platform's names, all the way into the pay run. No translation layer sits between them.

Three facts behind the call

Payroll's decision rested on three facts, and the same three questions decide the call for any downstream:

  • The upstream model is good enough for your purpose. The vendor built its worker and assignment model to feed payroll systems, and the effective-dated pay changes payroll needs are already in it. A model of payroll's own would have come out almost the same.
  • You have no leverage. The firm is one customer among thousands, and a request to rename Assignment to Contract would sit in the vendor's backlog indefinitely. An upstream that plans around your needs is a different relationship, and there you can negotiate a better model instead of conforming to the one you get.
  • Translating costs more than the coupling. A translation layer is code to write, test and change every time either side moves. For a model payroll would mostly copy field for field, that cost buys little.

Take one of them away and the answer can flip. A model that fights what you do, or a translation that turns out cheap, points toward translating instead; an upstream team that would listen opens the way to negotiating a model, which may need no translation at all.

The vendor's release notes are now yours

The coupling payroll accepted is real. It shows up in the code, in the conversations, and in the data.

Upstream changes ripple straight into your code. When the vendor reshapes its model, payroll reshapes with it: a grade that moves from Assignment to a new Position record means every class, query and test that reads the grade has to change too once the old field is retired, on the vendor's schedule rather than payroll's.

Your own language bends to theirs. The payroll specialists still say contract. When one reports that a contract ended on the wrong date, a developer looks for an assignment's effective end, and every conversation between the two carries a small translation that the code no longer does for them.

You inherit their mistakes. The platform holds the cost centre as free text, so one department appears as ENG, Eng. and Engineering, depending on who typed it, and payroll's cost reports split it three ways. Having adopted the model, payroll can group the variants in each report that needs it, but a clean cost centre of its own would be a first step outside that model, and fixing the field upstream is not in its hands.

How far conformity reaches

Conforming is a decision about one relationship and the part of the model that crosses it, not a stance for the whole system. Payroll conforms in what it reads from the HR platform: who works here, on what terms, from which date. Tax withholding, pension contributions and the payslip are payroll's own concepts, which the vendor does not define, and they stay in payroll's own model and words. Conforming to an upstream's internal model is also not the only form: a downstream can conform to a documented Published Language that the upstream offers, which ties it to a format meant to be stable rather than to the upstream's internals.

Watch outThe mistake to watch for is conforming by default: taking an upstream model as-is where the team has leverage to negotiate, or where the coupling will clearly cost more than a translation layer, without anyone having decided it. A reason written next to the relationship lets the next team check whether it still holds.

When the coupling outgrows the savings

The facts behind the decision can change. When the firm bought a smaller company that ran a different HR system, payroll had two upstream models of the same person, and conforming to both would have split its code in two. A second upstream, an upstream model that starts to distort payroll's own rules, or releases that keep breaking the pay run are the signals to put an anti-corruption layer at the boundary, translating the upstream model into one payroll owns. How that layer translates, and what it costs to run, is in Anti-Corruption Layer.

Putting a Conformist on the map

One seam on the Context Mapping Challenge's Grid needs a downstream with no negotiating power, modelled as a Conformist. Make it a seam where all three facts hold, such as a context that consumes a large outside provider's model, and label it with the fact that makes conforming cheaper than translating. Payroll's label would read: vendor model built for payroll, no leverage, little to translate. A Conformist you can label that way is a decision; one you cannot is probably a default.

Practice this