Part 5

Scenarios: one order through all views

Kruchten’s fifth view checks the other four against a real use case.

Kruchten uses a few important scenarios to find the elements of an architecture and to check them afterwards.1 Here is one order, step by step.

Try it

Figure 1. The four views in the layout of Kruchten.

In step 5 Finance is down, and the order is still not lost: the invoices belong to Finance, an event connects it to Sales, and a queue keeps that event until Finance is back.

Try it on your own system

Take the three use cases that matter most and walk them through the four views. Where a view has no clear answer, start there.

Changing an existing system

What blocks better boundaries is usually about people and the organization: which team owns what, who decides, how work is planned and paid for, and habits that grew over years. Moving code is work you can plan. Changing who owns a rule takes conversations, trust and time. By Conway’s law the system follows the teams, so a change in the teams is often the step that makes the change in the code possible.

So change one thing at a time: move one rule to its owner, give one boundary its own team, turn one call into an event.

Small steps add up. Each step makes the next one easier. A rule in the right place makes the next rule easier to move, and a team that owns its boundary starts to improve it by itself. Together the steps grow much faster than their sum.

A single step is easy to dismiss as too small to matter. Count what it makes possible: the next rule that can move, or the team that can now release on its own.

In short

Where a boundary lies, how many deployment units there are and how the repositories are laid out are separate decisions. A modular monolith and microservices can have the same boundaries. A distributed monolith usually keeps the boundaries of the ball of mud it came from, and with them its problems.

References

  1. Philippe Kruchten, Architectural Blueprints: The “4+1” View Model of Software Architecture, 1995, section “Scenarios”.

The steps of the order are an example.